auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected final Object doWork() { final CopyNumberTriStateHiddenMarkovModel model = modelArguments.createModel(); final TargetCollection<Target> targets = targetArguments.readTargetCollection(false); final ReadCountCollection inputCounts = readAndSortCountsByTargetCoordinates(targets); applyZScoreTransformation(inputCounts); checkForMissingTargetsInInputCounts(targets, inputCounts); openOutput(outputFile, model, targets, inputCounts); <START> final Object result = makeCalls(model, targets, inputCounts); <END> closeOutput(outputFile); return result; }</code><technical_language>makeCalls returns SUCCESS long throw exception, right? makeCalls a void method doWork return SUCCESS</technical_language>

Target:
protected final Object doWork() { final CopyNumberTriStateHiddenMarkovModel model = modelArguments.createModel(); final TargetCollection<Target> targets = targetArguments.readTargetCollection(false); final ReadCountCollection inputCounts = readAndSortCountsByTargetCoordinates(targets); applyZScoreTransformation(inputCounts); checkForMissingTargetsInInputCounts(targets, inputCounts); openOutput(outputFile, model, targets, inputCounts); makeCalls(model, targets, inputCounts); closeOutput(outputFile); return "SUCCESS"; }
Source:
<code>public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Card sourceCard = game.getCard(source.getSourceId()); if (controller != null && sourceCard != null) { Target target = new TargetControlledPermanent(0, Integer.MAX_VALUE, filter, true); if (target.canChoose(source.getSourceId(), source.getControllerId(), game) && controller.chooseTarget(Outcome.Detriment, target, source, game)) { if (!target.getTargets().isEmpty()) { int sacrificedForests = target.getTargets().size(); game.informPlayers(controller.getLogName() + " sacrifices " + sacrificedForests + " untapped Forests for " + sourceCard.getLogName()); for (UUID targetId : target.getTargets()) { Permanent targetPermanent = game.getPermanent(targetId); if (targetPermanent != null) { targetPermanent.sacrifice(source.getSourceId(), game); } } <START> game.addEffect(new SetPowerToughnessSourceEffect(sacrificedForests, sacrificedForests, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); <END> return true; } } } return false; }</code><technical_language>I Duration.CUSTOM, effect discarded if Wood Elemental left battlefeild. WhileOnBattlefield get multiple continuous effects active time Wood Elemental left returned battlefield. P/T result correct</technical_language>

Target:
public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Card sourceCard = game.getCard(source.getSourceId()); if (controller != null && sourceCard != null) { Target target = new TargetControlledPermanent(0, Integer.MAX_VALUE, filter, true); if (target.canChoose(source.getSourceId(), source.getControllerId(), game) && controller.chooseTarget(Outcome.Detriment, target, source, game)) { if (!target.getTargets().isEmpty()) { int sacrificedForests = target.getTargets().size(); game.informPlayers(controller.getLogName() + " sacrifices " + sacrificedForests + " untapped Forests for " + sourceCard.getLogName()); for (UUID targetId : target.getTargets()) { Permanent targetPermanent = game.getPermanent(targetId); if (targetPermanent != null) { targetPermanent.sacrifice(source.getSourceId(), game); } } game.addEffect(new SetPowerToughnessSourceEffect(sacrificedForests, sacrificedForests, Duration.Custom, SubLayer.SetPT_7b), source); return true; } } } return false; }
Source:
<code>private String convertBytesToString(List<Byte> bytes) { <START> Collections.reverse(bytes); <END> Byte[] byteArray = bytes.toArray(new Byte[bytes.size()]); return new String(ArrayUtils.toPrimitive(byteArray), Charset.forName("UTF-8")); }</code><technical_language>IIRC is a method, creates new collection ArrayList LinkedList updating original one. performance PoV. Reverese iterator Array list</technical_language>

Target:
private String convertBytesToString(List<Byte> bytes) { Collections.reverse(bytes); Byte[] byteArray = bytes.toArray(new Byte[bytes.size()]); return new String(ArrayUtils.toPrimitive(byteArray), getCharset()); }
Source:
<code>public void setRegion (Region region) { checkWidget (); if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); long shape_region = (region == null) ? 0 : region.handle; this.region = region; long topHandle = topHandle (); <START> GTK.gtk_widget_shape_combine_region(topHandle, shape_region); <END> if (!OS.isX11()) { double alpha = GTK.gtk_widget_get_opacity(topHandle); if (alpha == 1) alpha = 0.99; GTK.gtk_widget_set_opacity(topHandle, alpha); } }</code><technical_language>gtk_widget_shape_combine_region() gdk_window_shape_combine_region() do work widgets GtkWindow. This is checks for GTK_TYPE_WINDOW() included here, other widgets do cairo drawing show a region. find more out this in bug 529431. I if statement for GTK3.10+ GTK_TYPE_WINDOW() put code there. other cases need cairo drawing</technical_language>

Target:
public void setRegion (Region region) { checkWidget (); if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); long shape_region = (region == null) ? 0 : region.handle; this.region = region; long topHandle = topHandle (); if (GTK.GTK_VERSION < OS.VERSION(3, 10, 0) || OS.G_OBJECT_TYPE(topHandle) == GTK.GTK_TYPE_WINDOW()) { GTK.gtk_widget_shape_combine_region(topHandle, shape_region); if (!OS.isX11()) { double alpha = GTK.gtk_widget_get_opacity(topHandle); if (alpha == 1) alpha = 0.99; GTK.gtk_widget_set_opacity(topHandle, alpha); } } else { drawRegion = (this.region != null && this.region.handle != 0); if (drawRegion) { cairoCopyRegion(this.region); } else { cairoDisposeRegion(); } GTK.gtk_widget_queue_draw(topHandle()); } }
Source:
<code>private boolean validateStorage() { List<DiskImage> vmDisksList = getDisksListForChecks(); vmDisksList = ImagesHandler.getDisksDummiesForStorageAllocations(vmDisksList); List<DiskImage> allDisks = new ArrayList<>(vmDisksList); List<DiskImage> memoryDisksList = null; if (getParameters().isSaveMemory()) { <START> memoryDisksList = MemoryUtils.createDiskDummies(VmDeviceUtils.getTotalMemorySizeInBytes(getVm()), MemoryUtils.METADATA_SIZE_IN_BYTES); <END> if (Guid.Empty.equals(getStorageDomainIdForVmMemory(memoryDisksList))) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_NO_SUITABLE_DOMAIN_FOUND); } allDisks.addAll(memoryDisksList); } MultipleStorageDomainsValidator sdValidator = createMultipleStorageDomainsValidator(allDisks); if (!validate(sdValidator.allDomainsExistAndActive()) || !validate(sdValidator.allDomainsWithinThresholds()) || !validateCinder()) { return false; } if (memoryDisksList == null) { return validate(sdValidator.allDomainsHaveSpaceForNewDisks(vmDisksList)); } return validate(sdValidator.allDomainsHaveSpaceForAllDisks(vmDisksList, memoryDisksList)); }</code><technical_language>Please, wrap line</technical_language>

Target:
private boolean validateStorage() { List<DiskImage> vmDisksList = getDisksListForChecks(); vmDisksList = ImagesHandler.getDisksDummiesForStorageAllocations(vmDisksList); List<DiskImage> allDisks = new ArrayList<>(vmDisksList); List<DiskImage> memoryDisksList = null; if (getParameters().isSaveMemory()) { memoryDisksList = MemoryUtils.createDiskDummies(VmUtils.getSnapshotMemorySizeInBytes(getVm()), MemoryUtils.METADATA_SIZE_IN_BYTES); if (Guid.Empty.equals(getStorageDomainIdForVmMemory(memoryDisksList))) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_NO_SUITABLE_DOMAIN_FOUND); } allDisks.addAll(memoryDisksList); } MultipleStorageDomainsValidator sdValidator = createMultipleStorageDomainsValidator(allDisks); if (!validate(sdValidator.allDomainsExistAndActive()) || !validate(sdValidator.allDomainsWithinThresholds()) || !validateCinder()) { return false; } if (memoryDisksList == null) { return validate(sdValidator.allDomainsHaveSpaceForNewDisks(vmDisksList)); } return validate(sdValidator.allDomainsHaveSpaceForAllDisks(vmDisksList, memoryDisksList)); }
Source:
<code>public OnlineBackupContext fromCommandLineArguments( String[] commandlineArgs ) { try { OnlineBackupRequiredArguments requiredArguments = backupCommandArgumentHandler.establishRequiredArguments( commandlineArgs ); Config config = onlineBackupCommandConfigLoader.loadConfig( requiredArguments.getAdditionalConfig() ); <START> CheckConsistencyConfig checkConsistencyConfig = backupCommandArgumentHandler.establishConfigurationOverride( config ); <END> return new OnlineBackupContext( requiredArguments, config, checkConsistencyConfig ); } catch ( IncorrectUsage | CommandFailed e ) { throw new IllegalArgumentException( "Something went wrong when evaluating input", e ); } }</code><technical_language>rename</technical_language>

Target:
public OnlineBackupContext fromCommandLineArguments( String[] commandlineArgs ) { try { OnlineBackupRequiredArguments requiredArguments = backupCommandArgumentHandler.establishRequiredArguments( commandlineArgs ); Config config = onlineBackupCommandConfigLoader.loadConfig( requiredArguments.getAdditionalConfig() ); ConsistencyFlags consistencyFlags = backupCommandArgumentHandler.readFlagsFromArgumentsOrDefaultToConfig( config ); return new OnlineBackupContext( requiredArguments, config, consistencyFlags ); } catch ( IncorrectUsage | CommandFailed e ) { throw new IllegalArgumentException( "Something went wrong when evaluating input", e ); } }
Source:
<code>public static String sanitizeForHtmlTag(String str) { if (str == null) { return null; } <START> return str.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;"); <END> }</code><technical_language>Hmmm & need sanitized</technical_language>

Target:
public static String sanitizeForHtmlTag(String str) { if (str == null) { return null; } return str.replace("<", "&lt;").replace(">", "&gt;"); }
Source:
<code><START> public void testClear() { <END> PermanentStorageProxy p = new PermanentStorage(); p.writeToFile("double,fancyname,1.23\nboolean,flag,true\nstring,phrase,What time is it?"); p.loadFromDisk(); p.clear(); boolean result = p.getDouble("fancyname") == null; assertEquals("Should get null back when the table is clear!", result, true); }</code><technical_language>This test a weary pass if clear work write file/load disk part working</technical_language>

Target:
public void testClear() { PermanentStorageProxy p = new PermanentStorage(); p.writeToFile("double,fancyname,1.23\nboolean,flag,true\nstring,phrase,What time is it?"); p.loadFromDisk(); assertEquals(p.getDouble("fancyname"), 1.23, .01); p.clear(); boolean result = p.getDouble("fancyname") == null; assertEquals("Should get null back when the table is clear!", result, true); }
Source:
<code>public void fetchesJson() throws Exception { final String object = "object"; final String message = "message"; final References refs = repo().git().references(); final Tags tags = repo().git().tags(); <START> final String objectsha = refs.get("refs/heads/master").json() <END> .getJsonObject(object).getString("sha"); final JsonObject tagger = Json.createObjectBuilder() .add("name", "Scott").add("email", "scott@gmail.com") .add("date", "2013-06-17T14:53:35-07:00").build(); final JsonObject input = Json.createObjectBuilder() .add("tag", "v.0.1").add(message, "initial version") .add(object, objectsha).add("type", "commit") .add("tagger", tagger).build(); final Tag tag = tags.create(input); try { MatcherAssert.assertThat( tag.json().getString(message), Matchers.is("initial version") ); } finally { refs.remove("tags/v.0.1"); } }</code><technical_language>sha</technical_language>

Target:
public void fetchesJson() throws Exception { final String object = "object"; final String message = "message"; final String content = "initial version"; final String name = RandomStringUtils.randomAlphabetic(Tv.FIVE); final References refs = repo().git().references(); final String sha = refs.get("refs/heads/master").json() .getJsonObject(object).getString("sha"); final JsonObject tagger = Json.createObjectBuilder() .add("name", "Scott").add("email", "scott@gmail.com") .add("date", "2013-06-17T14:53:35-07:00").build(); final Tag tag = repo().git().tags().create( Json.createObjectBuilder().add("tag", name) .add(message, content) .add(object, sha).add("type", "commit") .add("tagger", tagger).build() ); try { MatcherAssert.assertThat( tag.json().getString(message), Matchers.is(content) ); } finally { refs.remove( new StringBuilder().append("tags/").append(name).toString() ); } }
Source:
<code>private int getClosestIndex(){ <START> double min = Double.MAX_VALUE; END> int closestIndex = -1; for(int i = Math.max(bestGuess-50,0);i<Math.min(wayPoints.size(),bestGuess+50);i++){ double d = getDistince(pose,wayPoints.get(i)); if(d < min){ min = d; closestIndex = i; } } return closestIndex; }</code><technical_language>brakes definitely*</technical_language>

Target:
private int getClosestIndex(){ double min = Double.MAX_VALUE; int closestIndex = -1; for(int i = Math.max(bestGuess-50,0);i<Math.min(wayPoints.size(),bestGuess+50);i++){ double d = getDistance(pose,wayPoints.get(i)); if(d < min){ min = d; closestIndex = i; } } return closestIndex; }
Source:
<code>public Page getNextPage() { if (isFinished()) { close(); return null; } if (!isPinotDataFetched) { fetchPinotData(); } if (currentDataTable != null) { estimatedMemoryUsageInBytes -= currentDataTable.getEstimatedSizeInBytes(); } if (dataTableList.size() == 0) { close(); return null; } currentDataTable = dataTableList.pop(); PageBuilder pageBuilder = new PageBuilder(columnTypes); pageBuilder.declarePositions(currentDataTable.getDataTable().getNumberOfRows()); for (int columnHandleIdx = 0; columnHandleIdx < columnHandles.size(); columnHandleIdx++) { BlockBuilder blockBuilder = pageBuilder.getBlockBuilder(columnHandleIdx); Type columnType = columnTypes.get(columnHandleIdx); writeBlock(blockBuilder, columnType, pinotColumnNameIndexMap.get(columnHandles.get(columnHandleIdx).getColumnName())); } <START> Page page = pageBuilder.build(); <END> return page; }</code><technical_language>nit: return pageBuilder.build();</technical_language>

Target:
public Page getNextPage() { if (isFinished()) { close(); return null; } if (!isPinotDataFetched) { fetchPinotData(); } if (currentDataTable != null) { estimatedMemoryUsageInBytes -= currentDataTable.getEstimatedSizeInBytes(); } if (dataTableList.size() == 0) { close(); return null; } currentDataTable = dataTableList.pop(); PageBuilder pageBuilder = new PageBuilder(columnTypes); pageBuilder.declarePositions(currentDataTable.getDataTable().getNumberOfRows()); for (int columnHandleIdx = 0; columnHandleIdx < columnHandles.size(); columnHandleIdx++) { BlockBuilder blockBuilder = pageBuilder.getBlockBuilder(columnHandleIdx); Type columnType = columnTypes.get(columnHandleIdx); writeBlock(blockBuilder, columnType, pinotColumnNameIndexMap.get(columnHandles.get(columnHandleIdx).getColumnName())); } return pageBuilder.build(); }
Source:
<code>private boolean abortInCatch(CatchTree catchTree, VisitorState state) { List<? extends StatementTree> statements = catchTree.getBlock().getStatements(); if (statements.isEmpty()) { return false; } StatementTree lastStmt = statements.get(statements.size() - 1); if (lastStmt.getKind() == EXPRESSION_STATEMENT) { ExpressionTree et = ((ExpressionStatementTree) lastStmt).getExpression(); <START> <END> Symbol sym = ASTHelpers.getSymbol(et); if (sym == null || !(sym instanceof MethodSymbol)) { return false; } String methodName = sym.getQualifiedName().toString(); String className = sym.owner.getQualifiedName().toString(); if (methodName.contains("abort") || methodName.contains("shutdown") || (methodName.equals("exit") && className.equals("java.lang.System"))) { return true; } } return false; }</code><technical_language>I MethodMatchers library do in a clearer way. like: private static final Matcher<ExpressionTree> ABORT_MATCHER = Matchers.anyOf( MethodMatchers.staticMethod.onClass("java.lang.System").named("exit"), MethodMatchers.anyMethod().anyClass().withNameMatching(Pattern.compile(".*(?i:abort).*")), MethodMatchers.anyMethod().anyClass().withNameMatching(Pattern.compile(".*(?i:shutdown).*"))); this method return ABORT_MATCHER.matches(et, state)</technical_language>

Target:
private boolean abortInCatch(CatchTree catchTree, VisitorState state) { List<? extends StatementTree> statements = catchTree.getBlock().getStatements(); if (statements.isEmpty()) { return false; } StatementTree lastStmt = statements.get(statements.size() - 1); if (lastStmt.getKind() == EXPRESSION_STATEMENT) { ExpressionTree et = ((ExpressionStatementTree) lastStmt).getExpression(); if (ABORT_MATCHER.matches(et, state)) { return true; } } return false; }
Source:
<code>public static String buildJsonAuthorisationDetailsWithoutAddress() { JsonObject authorisationDetails = buildJsonAuthorisationDetailsWithoutAddress( CARD_HOLDER_NAME, CARD_NUMBER, CVC, EXPIRY_DATE, CARD_BRAND, Boolean.TRUE, <START> null); <END> return toJson(authorisationDetails); }</code><technical_language>I PayersCardType is null realistically more set</technical_language>

Target:
public static String buildJsonAuthorisationDetailsWithoutAddress() { JsonObject authorisationDetails = buildJsonAuthorisationDetailsWithoutAddress( CARD_HOLDER_NAME, CARD_NUMBER, CVC, EXPIRY_DATE, CARD_BRAND, Boolean.TRUE, PayersCardType.CREDIT); return toJson(authorisationDetails); }
Source:
<code>private <R> R withSyncListeners(boolean hasListeners, boolean expectEventOnNull, K key, V value, Callable<R> callable) { try { if (!hasListeners) { return callable.call(); } CountDownLatch latch = new CountDownLatch(1); notifier.addSyncNotificationLatch(cache, key, value, latch); try { R ret = callable.call(); if ((ret == null) && !expectEventOnNull) { return ret; } boolean wasClosed = latch.await(timeout, TimeUnit.MILLISECONDS); if (!wasClosed) { log.timeoutWaitingEvent(); } return ret; } finally { notifier.removeSyncNotificationLatch(cache, key, value, latch); } } catch (Exception ex) { <START> if (!(ex instanceof CacheEntryListenerException)) { <END> throw new CacheEntryListenerException(ex); } else { throw (CacheEntryListenerException) ex; } } }</code><technical_language>This is personal preference, if 2 catch blocks is CacheEntryListenerException is rethrown other is Exception a more clear. if statement is required</technical_language>

Target:
private <R> R withSyncListeners(boolean hasListeners, boolean expectEventOnNull, K key, V value, Callable<R> callable) { try { if (!hasListeners) { return callable.call(); } CountDownLatch latch = new CountDownLatch(1); notifier.addSyncNotificationLatch(cache, key, value, latch); try { R ret = callable.call(); if ((ret == null) && !expectEventOnNull) { return ret; } boolean wasClosed = latch.await(timeout, TimeUnit.MILLISECONDS); if (!wasClosed) { log.timeoutWaitingEvent(); } return ret; } finally { notifier.removeSyncNotificationLatch(cache, key, value, latch); } } catch (CacheEntryListenerException ex) { throw ex; } catch (Exception e) { throw new CacheEntryListenerException(e); } }
Source:
<code><START> public void testSelectorMatchOneOf() throws Exception { <END> TestCSSEngine engine = new TestCSSEngine(); final Element E = new TestElement("E", engine); engine.setElementProvider(new IElementProvider() { @Override public Element getElement(Object element, CSSEngine engine) { return E; } }); Selector selector = engine.parseSelectors("E[a~='B']").item(0); E.setAttribute("a", "B ABC"); assertTrue(engine.matches(selector, new Object(), null)); E.setAttribute("a", "ABC B"); assertTrue(engine.matches(selector, new Object(), null)); E.setAttribute("a", "ABC"); assertFalse(engine.matches(selector, new Object(), null)); E.setAttribute("a", "B"); assertTrue(engine.matches(selector, new Object(), null)); }</code><technical_language>JUnit4 @Test annotation is missing. test is executed</technical_language>

Target:
public void testSelectorMatchOneOf() throws Exception { TestCSSEngine engine = new TestCSSEngine(); engine.setElementProvider(new IElementProvider() { @Override public Element getElement(Object element, CSSEngine engine) { Element e = new TestElement("E", engine); e.setAttribute("a", element.toString()); return e; } }); Selector selector = engine.parseSelectors("E[a~='B']").item(0); assertTrue(engine.matches(selector, "B AB", null)); assertTrue(engine.matches(selector, "BC B", null)); assertFalse(engine.matches(selector, "ABC", null)); assertTrue(engine.matches(selector, "B", null)); }
Source:
<code><START> public void testQueryByDeploymentTimeAt() { <END> Deployment firstDeployment = repositoryService.createDeploymentQuery().deploymentName(FIRST_DEPLOYMENT_NAME).singleResult(); Deployment secondDeployment = repositoryService.createDeploymentQuery().deploymentName(SECOND_DEPLOYMENT_NAME).singleResult(); Deployment thirdDeployment = repositoryService.createDeploymentQuery().deploymentName(THIRD_DEPLOYMENT_NAME).singleResult(); ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery().deployedAt(firstDeployment.getDeploymentTime()); verifyQueryResults(query, 2); query = repositoryService.createProcessDefinitionQuery().deployedAt(secondDeployment.getDeploymentTime()); verifyQueryResults(query, 1); query = repositoryService.createProcessDefinitionQuery().deployedAt(thirdDeployment.getDeploymentTime()); verifyQueryResults(query, 1); }</code><technical_language>here, this test is works if time elapses deployments. Please verify returned definitions expect count is correct</technical_language>

Target:
public void testQueryByDeploymentTimeAt() throws ParseException { SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy - HH:mm:ss"); Date startTest = formatter.parse(formatter.format(DateUtils.addSeconds(ClockUtil.now(), 5))); ClockUtil.setCurrentTime(startTest); Date timeAtDeploymentOne = ClockUtil.getCurrentTime(); Deployment tempDeploymentOne = repositoryService.createDeployment() .addClasspathResource(getResourceOnePath()).addClasspathResource(getResourceTwoPath()).deploy(); engineRule.manageDeployment(tempDeploymentOne); Date timeAtDeploymentTwo = DateUtils.addSeconds(timeAtDeploymentOne, 5); ClockUtil.setCurrentTime(timeAtDeploymentTwo); Deployment tempDeploymentTwo = repositoryService.createDeployment() .addClasspathResource(getResourceOnePath()).deploy(); engineRule.manageDeployment(tempDeploymentTwo); Date timeAtDeploymentThree = DateUtils.addSeconds(timeAtDeploymentTwo, 5); ClockUtil.setCurrentTime(timeAtDeploymentThree); Deployment tempDeploymentThree = repositoryService.createDeployment() .addClasspathResource(getResourceThreePath()).deploy(); engineRule.manageDeployment(tempDeploymentThree); List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().deployedAt(timeAtDeploymentOne).list(); assertThat(processDefinitions).hasSize(2); assertThatProcessDefinitionsWereDeployedAt(processDefinitions, timeAtDeploymentOne); processDefinitions = repositoryService.createProcessDefinitionQuery().deployedAt(timeAtDeploymentTwo).list(); assertThat(processDefinitions).hasSize(1); assertThatProcessDefinitionsWereDeployedAt(processDefinitions, timeAtDeploymentTwo); processDefinitions = repositoryService.createProcessDefinitionQuery().deployedAt(timeAtDeploymentThree).list(); assertThat(processDefinitions).hasSize(1); assertThatProcessDefinitionsWereDeployedAt(processDefinitions, timeAtDeploymentThree); processDefinitions = repositoryService.createProcessDefinitionQuery().deployedAt(DateUtils.addSeconds(ClockUtil.getCurrentTime(), 5)).list(); assertThat(processDefinitions).hasSize(0); }
Source:
<code>private void registerCallbacks() { view.addCloseOnClickListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int index = MainView.getInstance().indexOfComponent(view); MainView.getInstance().remove(index); view.revalidate(); view.repaint(); MainView.getInstance().setSelectedIndex(0); } <START> }); <END> }</code><technical_language>wrong tabbing in this function</technical_language>

Target:
private void registerCallbacks() { view.addCloseOnClickListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final int index = MainView.getInstance().indexOfComponent(view); MainView.getInstance().remove(index); view.revalidate(); view.repaint(); MainView.getInstance().setSelectedIndex(0); } }); }
Source:
<code>public int hashCode() { <START> return Objects.hash(getCode(), qrcode, getDeviceId()); <END> }</code><technical_language>this getQRCode()</technical_language>

Target:
public int hashCode() { return Objects.hash(getCode(), getQRCode(), getDeviceId()); }
Source:
<code>public void asyncUpdateCacheSimpleCall() throws Exception { final CacheableTest.Foo foo = new CacheableTest.Foo(1L); final String first = foo.asyncGet().toString(); final String second = foo.asyncGet().toString(); MatcherAssert.assertThat(first, Matchers.equalTo(second)); try { TimeUnit.SECONDS.sleep(2); } catch (final InterruptedException ex) { throw new IllegalStateException(ex); } <START> final String thrid = foo.asyncGet().toString(); <END> MatcherAssert.assertThat(first, Matchers.equalTo(thrid)); try { TimeUnit.SECONDS.sleep(2); } catch (final InterruptedException ex) { throw new IllegalStateException(ex); } final String forth = foo.asyncGet().toString(); MatcherAssert.assertThat(first, Matchers.not(Matchers.equalTo(forth))); }</code><technical_language>@54uso inline this variable</technical_language>

Target:
public void asyncUpdateCacheSimpleCall() throws Exception { final CacheableTest.Foo foo = new CacheableTest.Foo(1L); final String first = foo.asyncGet().toString(); MatcherAssert.assertThat( first, Matchers.equalTo(foo.asyncGet().toString()) ); TimeUnit.SECONDS.sleep(2); MatcherAssert.assertThat( first, Matchers.equalTo(foo.asyncGet().toString()) ); TimeUnit.SECONDS.sleep(2); MatcherAssert.assertThat( first, Matchers.not(Matchers.equalTo(foo.asyncGet().toString())) ); }
Source:
<code>private static void addClassStaticMembersVariants(Set<HaxeComponentName> suggestedVariants, @Nullable HaxeClass haxeClass, boolean filterByAccess) { if (haxeClass == null) { return; } boolean extern = haxeClass.isExtern(); boolean isEnum = haxeClass instanceof HaxeEnumDeclaration; boolean isAbstractEnum = HaxeAbstractEnumUtil.isAbstractEnum(haxeClass); for (HaxeNamedComponent namedComponent : HaxeResolveUtil.findNamedSubComponents(haxeClass)) { final boolean needFilter = filterByAccess && !namedComponent.isPublic(); final HaxeComponentName componentName = namedComponent.getComponentName(); if(componentName != null) { if(isAbstractEnum && HaxeAbstractEnumUtil.isAbstractEnumField(namedComponent)) { <START> suggestedVariants.add(componentName); <END> } else if ((extern || !needFilter) && (namedComponent.isStatic() || isEnum)) { suggestedVariants.add(componentName); } } } }</code><technical_language>HaxeAbstractEnumUtil.isAbstractEnumField - checks time if class contains namedComponent is AbstractClass, simplified, ok</technical_language>

Target:
private static void addClassStaticMembersVariants(Set<HaxeComponentName> suggestedVariants, @Nullable HaxeClass haxeClass, boolean filterByAccess) { if (haxeClass == null) { return; } boolean extern = haxeClass.isExtern(); boolean isEnum = haxeClass instanceof HaxeEnumDeclaration; boolean isAbstractEnum = HaxeAbstractEnumUtil.isAbstractEnum(haxeClass); for (HaxeNamedComponent namedComponent : HaxeResolveUtil.findNamedSubComponents(haxeClass)) { final boolean needFilter = filterByAccess && !namedComponent.isPublic(); final HaxeComponentName componentName = namedComponent.getComponentName(); if(componentName != null) { if(isAbstractEnum && HaxeAbstractEnumUtil.couldBeAbstractEnumField(namedComponent)) { suggestedVariants.add(componentName); } else if ((extern || !needFilter) && (namedComponent.isStatic() || isEnum)) { suggestedVariants.add(componentName); } } } }
Source:
<code>public ActionResult execute() { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); String studentEmail = getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL); StudentProfileAttributes studentProfile = null; if (studentEmail == null || courseId == null) { if (!userInfo.isStudent) { return new JsonResult(STUDENT_NOT_FOUND, HttpStatus.SC_NOT_FOUND); } studentProfile = logic.getStudentProfile(userInfo.id); } else { StudentAttributes student = logic.getStudentForEmail(courseId, studentEmail); <START> if (student == null) { <END> return new JsonResult(STUDENT_NOT_FOUND, HttpStatus.SC_NOT_FOUND); } studentProfile = logic.getStudentProfile(student.googleId); } if (studentProfile == null || studentProfile.pictureKey.equals("")) { return new JsonResult(PROFILE_PIC_NOT_FOUND, HttpStatus.SC_NOT_FOUND); } return new ImageResult(studentProfile.pictureKey); }</code><technical_language>This checked in access control parts</technical_language>

Target:
public ActionResult execute() { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); String studentEmail = getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL); StudentProfileAttributes studentProfile = null; if (studentEmail == null || courseId == null) { studentProfile = logic.getStudentProfile(userInfo.id); } else { StudentAttributes student = logic.getStudentForEmail(courseId, studentEmail); if (!StringHelper.isEmpty(student.googleId)) { studentProfile = logic.getStudentProfile(student.googleId); } } if (studentProfile == null || studentProfile.pictureKey.equals("")) { return new JsonResult(PROFILE_PIC_NOT_FOUND, HttpStatus.SC_NOT_FOUND); } return new ImageResult(studentProfile.pictureKey); }
Source:
<code>private String buildChargeResponse(CreateChargeResponseFromConnector responseFromConnector) { PaymentSingleResultBuilder resultBuilder = aSuccessfulSinglePayment() .withChargeId(responseFromConnector.chargeId) .withAmount(responseFromConnector.amount) .withMatchingReference(responseFromConnector.reference) .withEmail(responseFromConnector.email) .withDescription(responseFromConnector.description) .withState(responseFromConnector.state) .withReturnUrl(responseFromConnector.returnUrl) .withCreatedDate(responseFromConnector.createdDate) .withLanguage(responseFromConnector.language) .withPaymentProvider(responseFromConnector.paymentProvider) .withDelayedCapture(responseFromConnector.delayedCapture) .withLinks(responseFromConnector.links) .withSettlementSummary(responseFromConnector.settlementSummary) .withCardDetails(responseFromConnector.cardDetails); <START> if (responseFromConnector.refundSummary != null) resultBuilder.withRefundSummary(responseFromConnector.refundSummary); <END> if (responseFromConnector.gatewayTransactionId != null) resultBuilder.withGatewayTransactionId(responseFromConnector.gatewayTransactionId); if (responseFromConnector.corporateCardSurcharge != null) resultBuilder.withCorporateCardSurcharge(responseFromConnector.corporateCardSurcharge); if (responseFromConnector.totalAmount != null) resultBuilder.withTotalAmount(responseFromConnector.totalAmount); responseFromConnector.metadata.ifPresent(m -> resultBuilder.withMetadata(m)); return resultBuilder.build(); }</code><technical_language>I thought style included control statements, I find written point it..</technical_language>

Target:
private String buildChargeResponse(CreateChargeResponseFromConnector responseFromConnector) { PaymentSingleResultBuilder resultBuilder = aSuccessfulSinglePayment() .withChargeId(responseFromConnector.chargeId) .withAmount(responseFromConnector.amount) .withMatchingReference(responseFromConnector.reference) .withEmail(responseFromConnector.email) .withDescription(responseFromConnector.description) .withState(responseFromConnector.state) .withReturnUrl(responseFromConnector.returnUrl) .withCreatedDate(responseFromConnector.createdDate) .withLanguage(responseFromConnector.language) .withPaymentProvider(responseFromConnector.paymentProvider) .withDelayedCapture(responseFromConnector.delayedCapture) .withLinks(responseFromConnector.links) .withSettlementSummary(responseFromConnector.settlementSummary) .withCardDetails(responseFromConnector.cardDetails); if (responseFromConnector.refundSummary != null) { resultBuilder.withRefundSummary(responseFromConnector.refundSummary); } if (responseFromConnector.gatewayTransactionId != null) { resultBuilder.withGatewayTransactionId(responseFromConnector.gatewayTransactionId); } if (responseFromConnector.corporateCardSurcharge != null) { resultBuilder.withCorporateCardSurcharge(responseFromConnector.corporateCardSurcharge); } if (responseFromConnector.totalAmount != null) { resultBuilder.withTotalAmount(responseFromConnector.totalAmount); } responseFromConnector.metadata.ifPresent(m -> resultBuilder.withMetadata(m)); return resultBuilder.build(); }
Source:
<code>public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); if (getArguments() != null && binding != null) { <START> @ScreenDef String screenName = getArguments().getString(Router.EXTRA_SCREEN_NAME); <END> if (screenName != null) { final List<FragmentItemModel> fragmentItems = getFragmentItems(); for (int i = 0; i < fragmentItems.size(); i++) { final FragmentItemModel item = fragmentItems.get(i); if (screenName.equals(Screen.COURSE_VIDEOS) && item.getIcon() == FontAwesomeIcons.fa_film) { binding.viewPager.setCurrentItem(i); break; } } getArguments().putString(Router.EXTRA_SCREEN_NAME, null); } } }</code><technical_language>screenName declare final</technical_language>

Target:
public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); if (getArguments() != null && binding != null) { @ScreenDef final String screenName = getArguments().getString(Router.EXTRA_SCREEN_NAME); if (screenName != null) { final List<FragmentItemModel> fragmentItems = getFragmentItems(); for (int i = 0; i < fragmentItems.size(); i++) { final FragmentItemModel item = fragmentItems.get(i); if (screenName.equals(Screen.COURSE_VIDEOS) && item.getIcon() == FontAwesomeIcons.fa_film) { binding.viewPager.setCurrentItem(i); break; } } getArguments().putString(Router.EXTRA_SCREEN_NAME, null); } } }
Source:
<code>public void startSinglePlayer() { <START> log.log(LogLevel.INFO, "Player Pressed the SingPlayer Button"); <END> Preloader.switchTo("singlePlayer", 400); }</code><technical_language>Typo <naming</technical_language>

Target:
public void startSinglePlayer() { log.log(LogLevel.INFO, "Player Pressed the SinglePlayer Button."); Preloader.switchTo("singlePlayer", 400); }
Source:
<code>public RuleTester() { <START> session = testSessionBuilder().setCatalog(CATALOG_ID).setSchema("tiny").setSystemProperty("task_concurrency", "1") END> .build(); queryRunner = new LocalQueryRunner(session); queryRunner.createCatalog(session.getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.<String, String>of()); this.metadata = queryRunner.getMetadata(); this.costCalculator = queryRunner.getCostCalculator(); this.transactionManager = queryRunner.getTransactionManager(); this.accessControl = queryRunner.getAccessControl(); }</code><technical_language>undo</technical_language>

Target:
public RuleTester() { session = testSessionBuilder() .setCatalog(CATALOG_ID) .setSchema("tiny") .setSystemProperty("task_concurrency", "1") .build(); queryRunner = new LocalQueryRunner(session); queryRunner.createCatalog(session.getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.of()); this.metadata = queryRunner.getMetadata(); this.costCalculator = queryRunner.getCostCalculator(); this.transactionManager = queryRunner.getTransactionManager(); this.accessControl = queryRunner.getAccessControl(); }
Source:
<code>public void optionalCommentOnLanguage(IRCBotUser user, OsuApiUser apiUser) { <START> user.message("ikhebepicmuis-jan learned me to talk Farsi!"); <END> }</code><technical_language>I if I unclear if a opinion this. I this line in Farsi, you</technical_language>

Target:
public void optionalCommentOnLanguage(IRCBotUser user, OsuApiUser apiUser) { user.message("ikhebepicmuis Farsi-harfzadano yaadamdaad!"); }
Source:
<code>FieldCapabilitiesIndexRequest(StreamInput in) throws IOException { super(in); if (in.readBoolean()) { shardId = new ShardId(in); <START> } <END> index = in.readOptionalString(); fields = in.readStringArray(); originalIndices = OriginalIndices.readOriginalIndices(in); indexFilter = in.getVersion().onOrAfter(Version.V_8_0_0) ? in.readOptionalNamedWriteable(QueryBuilder.class) : null; nowInMillis = in.getVersion().onOrAfter(Version.V_8_0_0) ? in.readLong() : 0L; }</code><technical_language>a pre-existing issue readOptionalWriteable for symmetry writeTo, writeOptionalWriteable. change write logic write booleans</technical_language>

Target:
FieldCapabilitiesIndexRequest(StreamInput in) throws IOException { super(in); shardId = in.readOptionalWriteable(ShardId::new); index = in.readOptionalString(); fields = in.readStringArray(); originalIndices = OriginalIndices.readOriginalIndices(in); indexFilter = in.getVersion().onOrAfter(Version.V_8_0_0) ? in.readOptionalNamedWriteable(QueryBuilder.class) : null; nowInMillis = in.getVersion().onOrAfter(Version.V_8_0_0) ? in.readLong() : 0L; }
Source:
<code>public void serverSend(final Receiver receiver, final Delivery delivery, String address, int messageFormat, ByteBuf messageEncoded) throws Exception { EncodedMessage encodedMessage = new EncodedMessage(messageFormat, messageEncoded.array(), messageEncoded.arrayOffset(), messageEncoded.writerIndex()); ServerMessage message = manager.getConverter().inbound(encodedMessage); if (address != null) { message.setAddress(new SimpleString(address)); } recoverContext(); PagingStore store = manager.getServer().getPagingManager().getPageStore(message.getAddress()); if (store.isRejectingMessages()) { if (delivery.remotelySettled()) { if (serverSession.getCurrentTransaction() != null) { <START> rollbackCurrentTX(false); <END> AMQPSessionContext context = ((AMQPSessionContext) delivery.getLink().getSession().getContext()); ProtonTransactionHandler handler = (ProtonTransactionHandler) context.getCoordinatorLink().getContext(); handler.close(false); } } else { rejectMessage(delivery, message.getAddress()); } } else { serverSend(message, delivery, receiver); } }</code><technical_language>a do here.. markRollbackOnly current Transaction</technical_language>

Target:
public void serverSend(final Receiver receiver, final Delivery delivery, String address, int messageFormat, ByteBuf messageEncoded) throws Exception { EncodedMessage encodedMessage = new EncodedMessage(messageFormat, messageEncoded.array(), messageEncoded.arrayOffset(), messageEncoded.writerIndex()); ServerMessage message = manager.getConverter().inbound(encodedMessage); if (address != null) { message.setAddress(new SimpleString(address)); } recoverContext(); PagingStore store = manager.getServer().getPagingManager().getPageStore(message.getAddress()); if (store.isRejectingMessages()) { if (delivery.remotelySettled()) { if (serverSession.getCurrentTransaction() != null) { String amqpAddress = delivery.getLink().getTarget().getAddress(); ActiveMQException e = new ActiveMQAMQPResourceLimitExceededException("Address is full: " + amqpAddress); serverSession.getCurrentTransaction().markAsRollbackOnly(e); } } else { rejectMessage(delivery); } } else { serverSend(message, delivery, receiver); } }
Source:
<code>@Override public Set<String> variables() { <START> return new HashSet<String>(Arrays.asList(keyFileVariable, usernameVariable, passphraseVariable)); <END> }</code><technical_language>tip: ImmutableSet.of</technical_language>

Target:
@Override public Set<String> variables() { Set<String> set = new HashSet<>(); set.add(keyFileVariable); if (usernameVariable != null) { set.add(usernameVariable); } if (passphraseVariable != null) { set.add(passphraseVariable); } return ImmutableSet.copyOf(set); }
Source:
<code>findProblematicTimeSeriesElement(String msg, List<TimeSeries> nextN) { <START> String regex = "timeSeries\\[(\\d+?)\\]\\.metric\\.labels\\[(\\d+?)\\]"; <END> Matcher matcher = Pattern.compile(regex).matcher(msg); if (matcher.find()) { int tsIndex = Integer.parseInt(matcher.group(1)) - 1; TimeSeries ts = nextN.get(tsIndex); return ts; } return null; }</code><technical_language>bad resort regex for this, is this format considered stable change in response</technical_language>

Target:
findProblematicTimeSeriesElement(String msg, List<TimeSeries> nextN) { String regex = "timeSeries\\[(\\d+?)\\]\\.metric\\.labels\\[(\\d+?)\\]"; Matcher matcher = Pattern.compile(regex).matcher(msg); if (matcher.find()) { int tsIndex = Integer.parseInt(matcher.group(1)); return nextN.get(tsIndex); } return null; }
Source:
<code>public void downloadRemoteIndex(String storageId, String repositoryId) throws ArtifactTransportException { Storage storage = getConfiguration().getStorage(storageId); Repository repository = storage.getRepository(repositoryId); String repositoryBasedir = repository.getBasedir(); File remoteIndexDirectory = new File(repositoryBasedir, ".index/remote"); RepositoryIndexer indexer = repositoryIndexManager.getRepositoryIndex(storageId + ":" + repositoryId); IndexDownloadRequest request = new IndexDownloadRequest(); request.setIndexingContextId(storageId + ":" + repositoryId); request.setRepositoryId(repositoryId); request.setRemoteRepositoryURL(repository.getRemoteRepository().getUrl()); request.setIndexLocalCacheDir(repositoryBasedir); request.setIndexDir(remoteIndexDirectory.toString()); request.setIndexer(indexer.getIndexer()); try { downloader.download(request); } <START> catch (IOException | ComponentLookupException e) <END> { throw new ArtifactTransportException("Failed to retrieve remote index for " + storageId + ":" + repositoryId + "!"); } }</code><technical_language>![CRITICAL](<LINK_0> log rethrow this exception. [![rule](<LINK_1>](<LINK_2></technical_language>

Target:
public void downloadRemoteIndex(String storageId, String repositoryId) throws ArtifactTransportException, RepositoryInitializationException { Storage storage = getConfiguration().getStorage(storageId); Repository repository = storage.getRepository(repositoryId); File repositoryBasedir = new File(repository.getBasedir()); File remoteIndexDirectory = new File(repositoryBasedir, ".index/remote"); if (!remoteIndexDirectory.exists()) { remoteIndexDirectory.mkdirs(); } RepositoryIndexer repositoryIndexer = createRepositoryIndexer(storageId, repositoryId, IndexTypeEnum.REMOTE.getType(), repositoryBasedir); IndexDownloadRequest request = new IndexDownloadRequest(); request.setIndexingContextId(storageId + ":" + repositoryId + ":remote"); request.setStorageId(storageId); request.setRepositoryId(repositoryId); request.setRemoteRepositoryURL(repository.getRemoteRepository().getUrl()); request.setIndexLocalCacheDir(repositoryBasedir); request.setIndexDir(remoteIndexDirectory.toString()); request.setIndexer(repositoryIndexer.getIndexer()); try { downloader.download(request); } catch (IOException | ComponentLookupException e) { throw new ArtifactTransportException("Failed to retrieve remote index for " + storageId + ":" + repositoryId + "!"); } }
Source:
<code>public void tearDown() throws Exception { <START> server.stop(); <END> Files.walk(server.getFtpRoot()) .sorted(Comparator.reverseOrder()) .map(java.nio.file.Path::toFile) .forEach(File::delete); }</code><technical_language>handle case server==null, i.e. setup failed</technical_language>

Target:
public void tearDown() throws Exception { if (server != null) { server.stop(); Files.walk(server.getFtpRoot()) .sorted(Comparator.reverseOrder()) .map(java.nio.file.Path::toFile) .forEach(File::delete); } }
Source:
<code>public void visitNode(Tree tree) { if (!hasSemantic()) { return; } if (tree.is(Tree.Kind.METHOD_INVOCATION)) { MethodInvocationTree mit = (MethodInvocationTree) tree; if (mit.arguments().size() >= 2 && ASSERT_THROWS_MATCHER.matches(mit)) { <START> Optional<IdentifierTree> expectedException = getExpectedException(mit.arguments().get(0)); ExpressionTree executable = mit.arguments().get(1); <END> if (expectedException.isPresent() && executable.is(Tree.Kind.LAMBDA_EXPRESSION)) { IdentifierTree expectedIdentifier = expectedException.get(); reportMultipleCallThrowingExceptionInTree(expectedIdentifier.symbolType(), ((LambdaExpressionTree) executable).body(), expectedIdentifier); } } } else { TryStatementTree tryStatementTree = (TryStatementTree) tree; if (isTryCatchIdiom(tryStatementTree)) { tryStatementTree.catches().forEach(c -> reportMultipleCallThrowingExceptionInTree(c.parameter().type().symbolType(), tryStatementTree.block(), c.parameter().type()) ); } } }</code><technical_language>JUnit4 supports assertions messages - parameter, JUnit5 (e.g. <LINK_0> relying exception type in position 0 executable in position 1, argue FNs a developer JUnit4 assertion. Do want support case well</technical_language>

Target:
public void visitNode(Tree tree) { if (tree.is(Tree.Kind.METHOD_INVOCATION)) { MethodInvocationTree mit = (MethodInvocationTree) tree; Arguments arguments = mit.arguments(); IdentifierTree identifierTree = ExpressionUtils.methodName(mit); if (JUNIT4_ASSERT_THROWS_WITH_MESSAGE.matches(mit)) { processAssertThrowsArguments(identifierTree, arguments.get(1), arguments.get(2)); } else if (arguments.size() >= 2 && ALL_ASSERT_THROWS_MATCHER.matches(mit)) { processAssertThrowsArguments(identifierTree, arguments.get(0), arguments.get(1)); } } else { TryStatementTree tryStatementTree = (TryStatementTree) tree; if (isTryCatchFail(tryStatementTree)) { List<Type> expectedTypes = tryStatementTree.catches().stream().map(c -> c.parameter().type().symbolType()).collect(Collectors.toList()); reportMultipleCallThrowingExceptionInTree(expectedTypes, tryStatementTree.block(), tryStatementTree.tryKeyword(), "body of this try/catch"); } } }
Source:
<code><START> public Protos.FrameworkID getFwId() { <END> return fwId; }</code><technical_language>Technically, need this method synchronized ensure a reading thread sees update a writing thread. remove synchronized setFwId() fwId AtomicReference volatile</technical_language>

Target:
public synchronized Protos.FrameworkID getFwId() { return fwId; }
Source:
<code>private boolean testServerSideInclude(String parameter, String value, Pattern testEvidence) { if (isStop()) { return true; } HttpMessage message = getNewMsg(); try { setParameter(message, parameter, value); sendAndReceive(message); StringBuilder evidence = new StringBuilder(); if (matchBodyPattern(message, testEvidence, evidence)) { <START> bingo(Alert.RISK_HIGH, Alert.CONFIDENCE_MEDIUM, null, parameter, value, value, evidence.toString(), message); <END> return true; } } catch (IOException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("IO exception while sending a message [URI=" + getBaseMsg().getRequestHeader().getURI() + ", parameter=" + parameter + ", value=" + value + "]:", e); } } return false; }</code><technical_language>worth attack in other info</technical_language>

Target:
private boolean testServerSideInclude(String parameter, String value, Pattern testEvidence) { if (isStop()) { return true; } HttpMessage message = getNewMsg(); try { setParameter(message, parameter, value); sendAndReceive(message); StringBuilder evidence = new StringBuilder(); if (matchBodyPattern(message, testEvidence, evidence)) { bingo(Alert.RISK_HIGH, Alert.CONFIDENCE_MEDIUM, null, parameter, value, null, evidence.toString(), message); return true; } } catch (IOException e) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("IO exception while sending a message [URI=" + getBaseMsg().getRequestHeader().getURI() + ", parameter=" + parameter + ", value=" + value + "]:", e); } } return false; }
Source:
<code>protected BaseDisk generateNewEntity() { BaseDisk d = new BaseDisk(); d.setId(Guid.newGuid()); d.setWipeAfterDelete(true); d.setPropagateErrors(PropagateErrors.Off); d.setDiskAlias("DiskName"); d.setSgio(ScsiGenericIO.FILTERED); <START> d.setDiskDescription(""); <END> return d; }</code><technical_language>needed, part of constructor</technical_language>

Target:
protected BaseDisk generateNewEntity() { BaseDisk d = new BaseDisk(); d.setId(Guid.newGuid()); d.setWipeAfterDelete(true); d.setPropagateErrors(PropagateErrors.Off); d.setDiskAlias("DiskName"); d.setSgio(ScsiGenericIO.FILTERED); return d; }