auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void renderCustomHearts(int xBasePos, int yBasePos, int potionOffset, int count, boolean absorb) { int regenOffset = absorb ? 10 : 0; for(int iter = 0; iter < count / 20; iter++) { int renderHearts = (count - 20 * (iter + 1)) / 2; int heartIndex = iter % 11; if(renderHearts > 10) { renderHearts = 10; } for(int i = 0; i < renderHearts; i++) { int y = 0; if(i + regenOffset == regen) { y -= 2; } if(absorb) { this.drawTexturedModalRect(xBasePos + 8 * i, yBasePos + y, 0, 54, 9, 9); } this.drawTexturedModalRect(xBasePos + 8 * i, yBasePos + y, 0 + 18 * heartIndex, potionOffset, 9, 9); } if(count % 2 == 1 && renderHearts < 10) { int y = renderHearts + regenOffset == regen ? -2 : 0; if(absorb) { this.drawTexturedModalRect(xBasePos + 8 * renderHearts, yBasePos + y, 0, 54, 9, 9); } this.drawTexturedModalRect(xBasePos + 8 * renderHearts, yBasePos + y, 9 + 18 * heartIndex, potionOffset, 9, 9); } } }

Target:
private void renderCustomHearts(int xBasePos, int yBasePos, int potionOffset, int count, boolean absorb) { int regenOffset = absorb ? 10 : 0; for(int iter = 0; iter < count / 20; iter++) { int renderHearts = (count - 20 * (iter + 1)) / 2; int heartIndex = iter % 11; if(renderHearts > 10) { renderHearts = 10; } for(int i = 0; i < renderHearts; i++) { int y = getYRegenOffset(i, regenOffset); if(absorb) { this.drawTexturedModalRect(xBasePos + 8 * i, yBasePos + y, 0, 54, 9, 9); } this.drawTexturedModalRect(xBasePos + 8 * i, yBasePos + y, 0 + 18 * heartIndex, potionOffset, 9, 9); } if(count % 2 == 1 && renderHearts < 10) { int y = getYRegenOffset(renderHearts, regenOffset); if(absorb) { this.drawTexturedModalRect(xBasePos + 8 * renderHearts, yBasePos + y, 0, 54, 9, 9); } this.drawTexturedModalRect(xBasePos + 8 * renderHearts, yBasePos + y, 9 + 18 * heartIndex, potionOffset, 9, 9); } } }
Source:
public PrefixedFileObjectPutter(final Path inputDirectory, final String prefix) { objectPutter = new LoggingFileObjectPutter(inputDirectory); this.prefix = prefix; }

Target:
public PrefixedFileObjectPutter(final Path inputDirectory, final String prefix) { this.objectPutter = new LoggingFileObjectPutter(inputDirectory); this.prefix = prefix; }
Source:
public void handleNodeDeleted(Event event) { LOG.debug("Received event: {}", event.getUei()); Long nodeId = event.getNodeid(); if (nodeId == null) { LOG.error(EventConstants.INTERFACE_DELETED_EVENT_UEI + ": Event with no node ID: " + event.toString()); return; } m_cache.removeInterfacesForNode(nodeId.intValue()); }

Target:
public void handleNodeDeleted(Event event) { Long nodeId = event.getNodeid(); LOG.debug("Received event: with nodeId = {}", event.getUei(), nodeId); if (nodeId == null) { LOG.error("{} : Event with no node ID: {}", EventConstants.INTERFACE_DELETED_EVENT_UEI, event.toString()); return; } m_cache.removeInterfacesForNode(nodeId.intValue()); }
Source:
public PrefetchableOrPredicate( Collection<? extends Predicate<ChangeData>> that) { super(that); }

Target:
PrefetchableOrPredicate( Collection<? extends Predicate<ChangeData>> that) { super(that); }
Source:
private void initLaunchers() { for (JsonGroup group : definition.getGroups()) { Provider provider = UserClusterDataExtractor.getGroupProvider(definition, group.getName()); Launcher launcher = launchers.get(provider.getClass()); if (launcher == null) { if (provider instanceof Ec2) { launcher = new Ec2Launcher(clusterContext.getEc2Context(), clusterContext.getSshKeyPair()); } else if (provider instanceof Baremetal) { launcher = new BaremetalLauncher(clusterContext.getSshKeyPair()); } else if (provider instanceof Gce) { launcher = new GceLauncher(clusterContext.getGceContext(), clusterContext.getSshKeyPair()); } else if (provider instanceof Occi){ launcher = new OcciLauncher(clusterContext.getOcciContext(),clusterContext.getSshKeyPair()); } launchers.put(provider.getClass(), launcher); } } }

Target:
private void initLaunchers() throws KaramelException { for (JsonGroup group : definition.getGroups()) { Provider provider = UserClusterDataExtractor.getGroupProvider(definition, group.getName()); Launcher launcher = launchers.get(provider.getClass()); if (launcher == null) { if (provider instanceof Ec2) { launcher = new Ec2Launcher(clusterContext.getEc2Context(), clusterContext.getSshKeyPair()); } else if (provider instanceof Baremetal) { launcher = new BaremetalLauncher(clusterContext.getSshKeyPair()); } else if (provider instanceof Gce) { launcher = new GceLauncher(clusterContext.getGceContext(), clusterContext.getSshKeyPair()); } else if (provider instanceof Nova) { launcher = new NovaLauncher(clusterContext.getNovaContext(), clusterContext.getSshKeyPair()); } else if (provider instanceof Occi) { launcher = new OcciLauncher(clusterContext.getOcciContext(), clusterContext.getSshKeyPair()); } launchers.put(provider.getClass(), launcher); } } }
Source:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GlobalConfigurationBuilder that = (GlobalConfigurationBuilder) o; if (evictionThreadPool != null ? !evictionThreadPool.equals(that.evictionThreadPool) : that.evictionThreadPool != null) return false; if (listenerThreadPool != null ? !listenerThreadPool.equals(that.listenerThreadPool) : that.listenerThreadPool != null) return false; if (replicationQueueThreadPool != null ? !replicationQueueThreadPool.equals(that.replicationQueueThreadPool) : that.replicationQueueThreadPool != null) return false; if (persistenceThreadPool != null ? !persistenceThreadPool.equals(that.persistenceThreadPool) : that.persistenceThreadPool != null) return false; if (cl != null ? !cl.equals(that.cl) : that.cl != null) return false; if (globalJmxStatistics != null ? !globalJmxStatistics.equals(that.globalJmxStatistics) : that.globalJmxStatistics != null) return false; if (serialization != null ? !serialization.equals(that.serialization) : that.serialization != null) return false; if (shutdown != null ? !shutdown.equals(that.shutdown) : that.shutdown != null) return false; if (site != null ? !site.equals(that.site) : that.site != null) return false; if (security != null ? !security.equals(that.security) : that.security != null) return false; return transport != null ? !transport.equals(that.transport) : that.transport != null; }

Target:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GlobalConfigurationBuilder that = (GlobalConfigurationBuilder) o; if (!evictionThreadPool.equals(that.evictionThreadPool)) return false; if (!listenerThreadPool.equals(that.listenerThreadPool)) return false; if (!replicationQueueThreadPool.equals(that.replicationQueueThreadPool)) return false; if (!persistenceThreadPool.equals(that.persistenceThreadPool)) return false; if (cl != null ? !cl.equals(that.cl) : that.cl != null) return false; if (!globalJmxStatistics.equals(that.globalJmxStatistics)) return false; if (!serialization.equals(that.serialization)) return false; if (!shutdown.equals(that.shutdown)) return false; if (!site.equals(that.site)) return false; if (!security.equals(that.security)) return false; return !transport.equals(that.transport); }
Source:
public synchronized Object invoke(MethodInvocation invocation) throws Throwable { Method method = invocation.getMethod(); Input input = AnnotationUtils.findAnnotation(method, Input.class); if (input != null) { String name = BindingBeanDefinitionRegistryUtils.getChannelName(input, method); return this.inputHolders.get(name).getBoundElement(); } else { Output output = AnnotationUtils.findAnnotation(method, Output.class); if (output != null) { String name = BindingBeanDefinitionRegistryUtils.getChannelName(output, method); return this.outputHolders.get(name).getBoundElement(); } } return null; }

Target:
public synchronized Object invoke(MethodInvocation invocation) throws Throwable { Method method = invocation.getMethod(); Input input = AnnotationUtils.findAnnotation(method, Input.class); if (input != null) { String name = BindingBeanDefinitionRegistryUtils.getBindingTargetName(input, method); return this.inputHolders.get(name).getBoundTarget(); } else { Output output = AnnotationUtils.findAnnotation(method, Output.class); if (output != null) { String name = BindingBeanDefinitionRegistryUtils.getBindingTargetName(output, method); return this.outputHolders.get(name).getBoundTarget(); } } return null; }
Source:
byte testByte() default (byte) 1; short testShort() default 2; int testInt() default 3; long testLong() default 4L; float testFloat() default 5.6f; double testDouble() default 7.8d; char testChar() default 'a'; String testString() default "10"; boolean testBoolean() default false; Class testClass() default TestEnum.class; TestEnum testEnum() default TestEnum.A; } public static @interface TestAnnotationArray { byte[] testBytes() default {(byte) 1, (byte) 2}; short[] testShorts() default {3, 4}; int[] testInts() default {5, 6}; long[] testLongs() default {7L, 8L}; float[] testFloats() default {9.1f, 2.3f}; double[] testDoubles() default {4.5d, 6.7d}; char[] testChars() default {'a', 'b'}; String[] testStrings() default {"cde", "fgh"}; boolean[] testBooleans() default {true, false}; Class[] testClasses() default {TestEnum.class, TestEnum.class}; TestEnum[] testEnums() default {TestEnum.A, TestEnum.B}; }

Target:
byte testByte() default (byte) 1; short testShort() default 2; int testInt() default 3; long testLong() default 4L; float testFloat() default 5.6f; double testDouble() default 7.8d; char testChar() default 'a'; String testString() default "10"; boolean testBoolean() default false; Class<?> testClass() default TestEnum.class; TestEnum testEnum() default TestEnum.A; OtherAnnotation testAnnotation() default @OtherAnnotation(foo = 23, bar = "baz"); } public static @interface OtherAnnotation { int foo() default 123; String bar() default "bar"; }
Source:
public void serverStarting(FMLServerStartingEvent evt) { new ForgeCommand(evt.getCommandDispatcher()); ConfigCommand.register(evt.getCommandDispatcher()); evt.getServer().getResourceManager().addReloadListener(new ReloadListener<Object>() { @Override protected Object prepare(IResourceManager resourceManagerIn, IProfiler profilerIn) { return null; } @Override protected void apply(Object splashList, IResourceManager resourceManagerIn, IProfiler profilerIn) { ForgeHooks.updateBurns(); } }); }

Target:
public void serverStarting(FMLServerStartingEvent evt) { new ForgeCommand(evt.getCommandDispatcher()); ConfigCommand.register(evt.getCommandDispatcher()); }
Source:
public void initialise() { addDesiredStateChange(new EnableShader("engine:prog.hdr")); addDesiredStateChange(new BindFBO("sceneToneMapped")); addDesiredStateChange(new SetViewportSizeOf("sceneToneMapped")); addDesiredStateChange(new Clear(true, true, false)); }

Target:
public void initialise() { requiresFBO(new FBOConfig(TONE_MAPPED, FULL_SCALE, FBO.Type.HDR), displayResolutionDependentFBOs); addDesiredStateChange(new BindFBO(TONE_MAPPED, displayResolutionDependentFBOs)); addDesiredStateChange(new EnableMaterial("engine:prog.hdr")); addDesiredStateChange(new SetViewportToSizeOf(TONE_MAPPED, displayResolutionDependentFBOs)); }
Source:
private List<String> parseGMLResultsForFeatureIDs(String file) { List<String> results = new ArrayList<String>(); ReachOverlayIdentifierParser roiParser; try { roiParser = new ReachOverlayIdentifierParser(); } catch (Exception e) { log.error("Unable to create GML SAX parser for model [" + modelBBox.getModelId() + "]. Exception: [" + e.getMessage() + "]"); return results; } try { results.addAll(roiParser.parseReachOverlayIdentifierSource(file)); } catch (SAXException e) { log.error("Unable to parse GeoServer response for [" + modelBBox.getModelId() + "]. SAXException: [" + e.getMessage() + "]"); e.printStackTrace(); } catch (IOException e) { log.error("Unable to parse GeoServer response for [" + modelBBox.getModelId() + "]. IOException: [" + e.getMessage() + "]"); e.printStackTrace(); } return results; }

Target:
private List<String> parseGMLResultsForFeatureIDs(String file) throws SAXException, IOException, ParserConfigurationException { List<String> results = new ArrayList<String>(); ReachOverlayIdentifierParser roiParser = new ReachOverlayIdentifierParser(); results.addAll(roiParser.parseReachOverlayIdentifierSource(file)); return results; }
Source:
private void export(SpanData span, List<TelemetryItem> telemetryItems) { Span.Kind kind = span.getKind(); String instrumentationName = span.getInstrumentationLibraryInfo().getName(); Matcher matcher = COMPONENT_PATTERN.matcher(instrumentationName); String stdComponent = matcher.matches() ? matcher.group(1) : null; if ("jms".equals(stdComponent) && !span.getParentSpanId().isValid() && kind == Span.Kind.CLIENT) { return; } if (kind == Span.Kind.INTERNAL) { if (span.getName().equals("log.message")) { exportLogSpan(span, telemetryItems); } else if (!span.getParentSpanId().isValid()) { exportRequest(stdComponent, span, telemetryItems); } else if (span.getName().equals("EventHubs.message")) { exportRemoteDependency(stdComponent, span, false, telemetryItems); } else { exportRemoteDependency(stdComponent, span, true, telemetryItems); } } else if (kind == Span.Kind.CLIENT || kind == Span.Kind.PRODUCER) { exportRemoteDependency(stdComponent, span, false, telemetryItems); } else if (kind == Span.Kind.SERVER || kind == Span.Kind.CONSUMER) { exportRequest(stdComponent, span, telemetryItems); } else { throw new UnsupportedOperationException(kind.name()); } }

Target:
private void export(SpanData span, List<TelemetryItem> telemetryItems) { Span.Kind kind = span.getKind(); String instrumentationName = span.getInstrumentationLibraryInfo().getName(); Matcher matcher = COMPONENT_PATTERN.matcher(instrumentationName); String stdComponent = matcher.matches() ? matcher.group(1) : null; if ("jms".equals(stdComponent) && !span.getParentSpanId().isValid() && kind == Span.Kind.CLIENT) { return; } if (kind == Span.Kind.INTERNAL) { if (!span.getParentSpanId().isValid()) { exportRequest(stdComponent, span, telemetryItems); } else if (span.getName().equals("EventHubs.message")) { exportRemoteDependency(stdComponent, span, false, telemetryItems); } else { exportRemoteDependency(stdComponent, span, true, telemetryItems); } } else if (kind == Span.Kind.CLIENT || kind == Span.Kind.PRODUCER) { exportRemoteDependency(stdComponent, span, false, telemetryItems); } else if (kind == Span.Kind.SERVER || kind == Span.Kind.CONSUMER) { exportRequest(stdComponent, span, telemetryItems); } else { throw new UnsupportedOperationException(kind.name()); } }
Source:
protected String sanitizedUrl(String url) { return super.sanitizedUrl(url) .replaceAll("(?i)(;password=)[^;]*", "$1****"); }

Target:
protected String sanitizedUrl(String url) { return super.sanitizedUrl(url) .replaceAll("(?i)([:;]password=)[^;]*", "$1****"); }
Source:
private static SubtaskCheckpointCoordinator coordinator(boolean unalignedCheckpointEnabled, ChannelStateWriter channelStateWriter) throws IOException { return new SubtaskCheckpointCoordinatorImpl( checkpointStorageWorkerView(100), "test", StreamTaskActionExecutor.IMMEDIATE, new CloseableRegistry(), newDirectExecutorService(), new DummyEnvironment(), (message, unused) -> fail(message), unalignedCheckpointEnabled, (unused1, unused2) -> CompletableFuture.completedFuture(null), 0, channelStateWriter ); }

Target:
private static SubtaskCheckpointCoordinator coordinator(boolean unalignedCheckpointEnabled, ChannelStateWriter channelStateWriter) throws IOException { return new SubtaskCheckpointCoordinatorImpl( new TestCheckpointStorageWorkerView(100), "test", StreamTaskActionExecutor.IMMEDIATE, new CloseableRegistry(), newDirectExecutorService(), new DummyEnvironment(), (message, unused) -> fail(message), unalignedCheckpointEnabled, (unused1, unused2) -> CompletableFuture.completedFuture(null), 0, channelStateWriter ); }
Source:
void onExitForeground(final long timestamp) { runOnLogThread(new Runnable() { @Override public void run() { if (Utils.isEmptyString(apiKey)) { return; } refreshSessionTime(timestamp); inForeground = false; if (flushEventsOnClose) { updateServer(); } dbHelper.insertOrReplaceKeyValue(DEVICE_ID_KEY, deviceId); dbHelper.insertOrReplaceKeyValue(USER_ID_KEY, userId); dbHelper.insertOrReplaceKeyLongValue(OPT_OUT_KEY, optOut ? 1L : 0L); dbHelper.insertOrReplaceKeyLongValue(LAST_EVENT_TIME_KEY, lastEventTime); } }); }

Target:
void onExitForeground(final long timestamp) { runOnLogThread(new Runnable() { @Override public void run() { if (Utils.isEmptyString(apiKey)) { return; } refreshSessionTime(timestamp); inForeground = false; if (flushEventsOnClose) { updateServer(); } dbHelper.insertOrReplaceKeyValue(DEVICE_ID_KEY, deviceId); dbHelper.insertOrReplaceKeyValue(USER_ID_KEY, userId); dbHelper.insertOrReplaceKeyLongValue(OPT_OUT_KEY, optOut ? 1L : 0L); dbHelper.insertOrReplaceKeyLongValue(PREVIOUS_SESSION_ID_KEY, sessionId); dbHelper.insertOrReplaceKeyLongValue(LAST_EVENT_TIME_KEY, lastEventTime); } }); }
Source:
private void loadProperties() throws IOException { properties = new Properties(); try (InputStream defaultProperties = getClass().getClassLoader().getResourceAsStream("default.properties")) { properties.load(defaultProperties); } String propertiesPath; if (System.getProperty("propFile", "").equals("")) { propertiesPath = "etc/app.properties"; } else { propertiesPath = System.getProperty("propFile"); } try (FileInputStream appProperties = new FileInputStream(propertiesPath)) { properties.load(appProperties); } catch (IOException e) { LOG.debug("No overriding properties found at '" + propertiesPath + "'."); } properties.putAll(System.getProperties()); LOG.info("Loaded app.properties from " + propertiesPath); }

Target:
private void loadProperties() throws IOException { properties = new Properties(); try (InputStream defaultProperties = getClass().getClassLoader().getResourceAsStream("default.properties")) { properties.load(defaultProperties); } String propertiesPath = System.getProperty(SYSTEM_PROPERTY); if (propertiesPath == null) { propertiesPath = DEFAULT_APPLICATION_PROPERTIES_PATH; } try (FileInputStream appProperties = new FileInputStream(propertiesPath)) { properties.load(appProperties); } catch (IOException e) { LOG.debug("No overriding properties found at '" + propertiesPath + "'."); } properties.putAll(System.getProperties()); LOG.info("Loaded app.properties from " + propertiesPath); }
Source:
public static void initialize(Retransformer trans) throws Exception { transformer = trans; URI uri = OpenTracingRuleLoader.class.getResource(ROOT_RULE_FOLDER).toURI(); String s = uri.toString(); int separator = s.indexOf("!/"); String entryName = s.substring(separator + 2); URI fileURI = URI.create(s.substring(0, separator)); List<String> scripts = new ArrayList<>(); List<String> scriptNames = new ArrayList<>(); try (FileSystem fs = FileSystems.newFileSystem(fileURI, Collections.<String, Object>emptyMap())) { Path rules = fs.getPath(entryName); Files.walk(rules).filter(f -> f.toString().endsWith(RULE_FILE_EXTENSION)).forEach(f -> { StringBuilder sb = new StringBuilder(); try (BufferedReader reader = Files.newBufferedReader(f, StandardCharsets.UTF_8)) { String str = null; while ((str = reader.readLine()) != null) { sb.append(str); sb.append("\r\n"); } if (log.isLoggable(Level.FINEST)) { log.finest("Installing rule name=" + f.toString() + " script=" + sb.toString()); } scriptNames.add(f.toString()); scripts.add(sb.toString()); } catch (IOException ioe) { log.log(Level.SEVERE, "Failed to load rule file: " + f.toString(), ioe); } }); } try (PrintWriter writer = new PrintWriter(new StringWriter())) { transformer.installScript(scripts, scriptNames, writer); } if (log.isLoggable(Level.FINE)) { log.fine("Installed rules"); } }

Target:
public static void initialize(Retransformer trans) throws Exception { transformer = trans; URI uri = OpenTracingRuleLoader.class.getResource(ROOT_RULE_FOLDER).toURI(); String s = uri.toString(); int separator = s.indexOf("!/"); String entryName = s.substring(separator + 2); URI fileURI = URI.create(s.substring(0, separator)); List<String> scripts = new ArrayList<>(); List<String> scriptNames = new ArrayList<>(); try (FileSystem fs = FileSystems.newFileSystem(fileURI, Collections.<String, Object>emptyMap())) { Path rules = fs.getPath(entryName); Files.walk(rules).filter(f -> f.toString().endsWith(RULE_FILE_EXTENSION)).forEach(f -> { try { scripts.add(new String(Files.readAllBytes(f))); scriptNames.add(f.toString()); } catch (IOException ioe) { log.log(Level.SEVERE, "Failed to load rule file: " + f.toString(), ioe); } }); } try (PrintWriter writer = new PrintWriter(new StringWriter())) { transformer.installScript(scripts, scriptNames, writer); } if (log.isLoggable(Level.FINE)) { log.fine("Installed rules"); } }
Source:
public void onPreMerge(Repository repo, CodeReviewCommit commit, ProjectState destProject, NameKey destBranch, Id patchSetId) throws MergeValidationException { PatchSetApproval psa = approvalsUtil.getSubmitter(reviewDb.get(), commit.notes(), patchSetId); if (psa == null) { throw new MergeValidationException( CommitMergeStatus.NO_PATCH_SET); } final IdentifiedUser submitter = identifiedUserFactory.create(psa.getAccountId()); if (!submitter.getCapabilities().canAdministrateServer()) { throw new MergeValidationException(CommitMergeStatus.MISSING_DEPENDENCY); } }

Target:
public void onPreMerge(Repository repo, CodeReviewCommit commit, ProjectState destProject, NameKey destBranch, Id patchSetId) throws MergeValidationException { PatchSetApproval psa = approvalsUtil.getSubmitter(reviewDb.get(), commit.notes(), patchSetId); if (psa == null) { throw new MergeValidationException(CommitMergeStatus.NO_PATCH_SET); } IdentifiedUser submitter = identifiedUserFactory.create(psa.getAccountId()); if (!submitter.getCapabilities().canAdministrateServer()) { throw new MergeValidationException(CommitMergeStatus.MISSING_DEPENDENCY); } }
Source:
public void testConnectAnnotationsStringIncomplete() { dispoItem.getDiscrepanciesList().values(); for (Discrepancy discrepancy : dispoItem.getDiscrepanciesList().values()) { discrepancy.setLocation(discrepancy.getLocation() + "zzz"); } DispoAnnotationData annotationOne = new DispoAnnotationData(); annotationOne.setLocationRefs("1zzz, 2zzz,12zzz,13zzz,14zzz,15zzz,16zzz,17zzz,18zzz"); annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("Code"); annotationOne.setId(annotIdOne); List<String> idsOfCoveredDisc = new ArrayList<String>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); List<String> idsOfCoveredDiscrepancies = annotationOne.getIdsOfCoveredDiscrepancies(); Assert.assertTrue(idsOfCoveredDiscrepancies.size() == 9); for (int i = 0; i < idsOfCoveredDiscrepancies.size(); i++) { if (i < 2) { assertEquals(idsOfCoveredDiscrepancies.get(i), idsForDiscrepancies1_5[i]); } else { assertEquals(idsOfCoveredDiscrepancies.get(i), idsForDiscrepancies12_18[i - 2]); } } assertTrue(annotationOne.getIsConnected()); String actual = dispoConnector.getItemStatus(dispoItem); assertEquals(DispoStrings.Item_InComplete, actual); }

Target:
public void testConnectAnnotationsStringIncomplete() { for (Discrepancy discrepancy : dispoItem.getDiscrepanciesList().values()) { discrepancy.setLocation(discrepancy.getLocation() + "zzz"); } DispoAnnotationData annotationOne = new DispoAnnotationData(); annotationOne.setLocationRefs("1zzz, 2zzz,12zzz,13zzz,14zzz,15zzz,16zzz,17zzz,18zzz"); annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("Code"); annotationOne.setId(annotIdOne); List<String> idsOfCoveredDisc = new ArrayList<String>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); List<String> idsOfCoveredDiscrepancies = annotationOne.getIdsOfCoveredDiscrepancies(); Assert.assertTrue(idsOfCoveredDiscrepancies.size() == 9); for (int i = 0; i < idsOfCoveredDiscrepancies.size(); i++) { if (i < 2) { assertEquals(idsOfCoveredDiscrepancies.get(i), idsForDiscrepancies1_5[i]); } else { assertEquals(idsOfCoveredDiscrepancies.get(i), idsForDiscrepancies12_18[i - 2]); } } assertTrue(annotationOne.getIsConnected()); String actual = dispoConnector.getItemStatus(dispoItem); assertEquals(DispoStrings.Item_InComplete, actual); }
Source:
public HashSet<String> getValues(ProgressMonitor pm){ HashSet<String> ret = new HashSet<String>(); try { long rowCount=ds.getRowCount(); pm.startTask(I18N.tr("Retrieving classes"), 10); pm.progressTo(0); double m = rowCount>0 ?(double)10/rowCount : 0; int n =0; int fieldIndex = ds.getFieldIndexByName(fieldName); for(long i=0; i<rowCount; i++){ Value val = ds.getFieldValue(i, fieldIndex); ret.add(val.toString()); if(i*m>n*10){ if(pm.isCancelled()){ pm.endTask(); return null; } n++; pm.progressTo(n); } } } catch (DriverException e) { LOGGER.error("IO error while handling the input data source : " + e.getMessage()); } pm.endTask(); return ret; }

Target:
public HashSet<String> getValues(ProgressMonitor pm){ HashSet<String> ret = new HashSet<String>(); try { long rowCount=ds.getRowCount(); pm.startTask(I18N.tr("Retrieving classes"), 10); pm.progressTo(0); double m = rowCount>0 ?(double)10/rowCount : 0; int n =0; int fieldIndex = ds.getFieldIndexByName(fieldName); for(long i=0; i<rowCount; i++){ Value val = ds.getFieldValue(i, fieldIndex); ret.add(val.toString()); if(i*m>n*10){ n++; pm.progressTo(n); } if(pm.isCancelled()){ pm.endTask(); return null; } } } catch (DriverException e) { LOGGER.error("IO error while handling the input data source : " + e.getMessage()); } pm.endTask(); return ret; }
Source:
public static void main(final String ... args) throws Exception { System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "info"); URI workingDirectory = new File(System.getProperty("user.dir")).getCanonicalFile().toURI(); SwiftGeneratorCommandLineConfig cliConfig = new SwiftGeneratorCommandLineConfig(); JCommander jCommander = new JCommander(cliConfig, args); jCommander.setProgramName(SwiftGenerator.class.getSimpleName()); if (cliConfig.inputFiles == null) { jCommander.usage(); return; } SwiftGeneratorConfig.Builder configBuilder = SwiftGeneratorConfig.builder() .inputBase(workingDirectory) .addInputs(Lists.transform(cliConfig.inputFiles, new Function<File, URI>() { @Nullable @Override public URI apply(@Nullable File input) { return input.toURI(); } })) .outputFolder(cliConfig.outputDirectory) .overridePackage(cliConfig.overridePackage) .defaultPackage(cliConfig.defaultPackage) .addTweak(SwiftGeneratorTweak.ADD_CLOSEABLE_INTERFACE) .generateIncludedCode(cliConfig.generateIncludedCode) .codeFlavor(cliConfig.mutableTypes ? "java-regular" : "java-immutable"); if (cliConfig.addThriftExceptions) { configBuilder.addTweak(SwiftGeneratorTweak.ADD_THRIFT_EXCEPTION); } new SwiftGenerator(configBuilder.build()).parse(); }

Target:
public static void main(final String ... args) throws Exception { URI workingDirectory = new File(System.getProperty("user.dir")).getCanonicalFile().toURI(); SwiftGeneratorCommandLineConfig cliConfig = new SwiftGeneratorCommandLineConfig(); JCommander jCommander = new JCommander(cliConfig, args); jCommander.setProgramName(SwiftGenerator.class.getSimpleName()); if (cliConfig.inputFiles == null) { jCommander.usage(); return; } SwiftGeneratorConfig.Builder configBuilder = SwiftGeneratorConfig.builder() .inputBase(workingDirectory) .outputFolder(cliConfig.outputDirectory) .overridePackage(cliConfig.overridePackage) .defaultPackage(cliConfig.defaultPackage) .generateIncludedCode(cliConfig.generateIncludedCode) .codeFlavor(cliConfig.generateBeans ? "java-regular" : "java-immutable"); for (SwiftGeneratorTweak tweak : cliConfig.tweaks) { configBuilder.addTweak(tweak); } if (cliConfig.addThriftExceptions) { configBuilder.addTweak(SwiftGeneratorTweak.ADD_THRIFT_EXCEPTION); } Iterable<URI> inputs = Iterables.transform(cliConfig.inputFiles, FILE_TO_URI_TRANSFORM); new SwiftGenerator(configBuilder.build()).parse(inputs); }
Source:
public void onEntitySpawn(EntitySpawnEvent event) { WorldConfigurationNode node = VanillaConfiguration.WORLDS.get(event.getEntity().getWorld()); Living mob = event.getEntity().get(Living.class); if (!(mob instanceof Player)) { if (!node.SPAWN_ANIMALS.getBoolean()) { if ((mob instanceof Neutral) || (mob instanceof Passive)) { event.setCancelled(true); } } if (!node.SPAWN_MONSTERS.getBoolean()) { if (mob instanceof Aggressive) { event.setCancelled(true); } } } }

Target:
public void onEntitySpawn(EntitySpawnEvent event) { WorldConfigurationNode node = VanillaConfiguration.WORLDS.get(event.getEntity().getWorld()); Living mob = event.getEntity().get(Living.class); if (!(mob instanceof Player)) { if (!node.SPAWN_ANIMALS.getBoolean()) { if (mob instanceof Neutral || mob instanceof Passive) { event.setCancelled(true); } } if (!node.SPAWN_MONSTERS.getBoolean()) { if (mob instanceof Aggressive) { event.setCancelled(true); } } } }
Source:
private Mono<java.net.http.HttpRequest> toJdkHttpRequest(HttpRequest request) { return Mono.fromCallable(() -> { final java.net.http.HttpRequest.Builder builder = java.net.http.HttpRequest.newBuilder(); try { builder.uri(request.getUrl().toURI()); } catch (URISyntaxException e) { throw logger.logExceptionAsError(Exceptions.propagate(e)); } final HttpHeaders headers = request.getHeaders(); if (headers != null) { for (HttpHeader header : headers) { final String headerName = header.getName(); if (!restrictedHeaders.contains(headerName)) { final String headerValue = header.getValue(); builder.setHeader(headerName, headerValue); } else { logger.error("The header '" + headerName + "' is restricted by default in JDK HttpClient 12 " + "and above (unless it is whitelisted in JAVA_HOME/conf/net.properties)."); } } } switch (request.getHttpMethod()) { case GET: return builder.GET().build(); case HEAD: return builder.method("HEAD", noBody()).build(); default: final String contentLength = request.getHeaders().getValue("content-length"); final BodyPublisher bodyPublisher = toBodyPublisher(request.getBody(), contentLength); return builder.method(request.getHttpMethod().toString(), bodyPublisher).build(); } }); }

Target:
private Mono<java.net.http.HttpRequest> toJdkHttpRequest(HttpRequest request) { return Mono.fromCallable(() -> { final java.net.http.HttpRequest.Builder builder = java.net.http.HttpRequest.newBuilder(); try { builder.uri(request.getUrl().toURI()); } catch (URISyntaxException e) { throw logger.logExceptionAsError(Exceptions.propagate(e)); } final HttpHeaders headers = request.getHeaders(); if (headers != null) { for (HttpHeader header : headers) { final String headerName = header.getName(); if (!restrictedHeaders.contains(headerName)) { final String headerValue = header.getValue(); builder.setHeader(headerName, headerValue); } else { logger.warning("The header '" + headerName + "' is restricted by default in JDK HttpClient 12 " + "and above. This header can be added to allow list in JAVA_HOME/conf/net.properties " + "or in System.setProperty() or in Configuration. Use the key 'jdk.httpclient" + ".allowRestrictedHeaders' and a comma separated list of header names."); } } } switch (request.getHttpMethod()) { case GET: return builder.GET().build(); case HEAD: return builder.method("HEAD", noBody()).build(); default: final String contentLength = request.getHeaders().getValue("content-length"); final BodyPublisher bodyPublisher = toBodyPublisher(request.getBody(), contentLength); return builder.method(request.getHttpMethod().toString(), bodyPublisher).build(); } }); }
Source:
protected boolean canDoAction() { if (!super.canDoAction()) { return false; } if (getMissingServerHooks().isEmpty()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_NO_CONFLICT_SERVERS); return false; } for (GlusterServerHook serverHook: getMissingServerHooks()) { VDS vds = getVdsDAO().get(serverHook.getServerId()); if (vds == null || vds.getStatus() != VDSStatus.Up) { setVdsName(vds.getName()); addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_SERVER_STATUS_NOT_UP); return false; } } return true; }

Target:
protected boolean canDoAction() { if (!super.canDoAction()) { return false; } if (getMissingServerHooks().isEmpty()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_NO_CONFLICT_SERVERS); return false; } for (GlusterServerHook serverHook: getMissingServerHooks()) { VDS vds = getVdsDAO().get(serverHook.getServerId()); if (vds == null || vds.getStatus() != VDSStatus.Up) { setVdsName(vds != null ? vds.getName() : "No Server"); addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_SERVER_STATUS_NOT_UP); return false; } } return true; }
Source:
public TopNNode(@JsonProperty("id") PlanNodeId id, @JsonProperty("source") PlanNode source, @JsonProperty("count") long count, @JsonProperty("orderBy") List<Symbol> orderBy, @JsonProperty("orderings") Map<Symbol, SortOrder> orderings, @JsonProperty("step") Step step) { super(id); requireNonNull(source, "source is null"); Preconditions.checkArgument(count >= 0, "count must be positive"); checkCondition(count <= Integer.MAX_VALUE, NOT_SUPPORTED, "ORDER BY LIMIT > %s is not supported", Integer.MAX_VALUE); requireNonNull(orderBy, "orderBy is null"); Preconditions.checkArgument(!orderBy.isEmpty(), "orderBy is empty"); Preconditions.checkArgument(orderings.size() == orderBy.size(), "orderBy and orderings sizes don't match"); this.source = source; this.count = count; this.orderBy = ImmutableList.copyOf(orderBy); this.orderings = ImmutableMap.copyOf(orderings); this.step = step; }

Target:
public TopNNode(@JsonProperty("id") PlanNodeId id, @JsonProperty("source") PlanNode source, @JsonProperty("count") long count, @JsonProperty("orderBy") List<Symbol> orderBy, @JsonProperty("orderings") Map<Symbol, SortOrder> orderings, @JsonProperty("step") Step step) { super(id); requireNonNull(source, "source is null"); Preconditions.checkArgument(count >= 0, "count must be positive"); checkCondition(count <= Integer.MAX_VALUE, NOT_SUPPORTED, "ORDER BY LIMIT > %s is not supported", Integer.MAX_VALUE); requireNonNull(orderBy, "orderBy is null"); Preconditions.checkArgument(!orderBy.isEmpty(), "orderBy is empty"); Preconditions.checkArgument(orderings.size() == orderBy.size(), "orderBy and orderings sizes don't match"); this.source = source; this.count = count; this.orderBy = ImmutableList.copyOf(orderBy); this.orderings = ImmutableMap.copyOf(orderings); this.step = requireNonNull(step, "step is null"); }
Source:
private final ClientResponseImpl dispatchSubscribe(InvocationClientHandler handler, StoredProcedureInvocation task) { final ParameterSet ps = task.getParams(); final Object params[] = ps.toArray(); String err = null; final ClientInterfaceHandleManager cihm = m_cihm.get(handler.connectionId()); if (cihm == null) { return null; } for (int ii = 0; ii < params.length; ii++) { final Object param = params[ii]; if (param == null) { err = "Parameter index " + ii + " was null"; break; } if (!(param instanceof String)) { err = "Parameter index " + ii + " was not a String"; break; } if ("TOPOLOGY".equals(param)) { cihm.setWantsTopologyUpdates(true); cihm.setWantsProcUpdates(true); } else { err = "Parameter \"" + param + "\" is not recognized/supported"; break; } } return new ClientResponseImpl( err == null ? ClientResponse.SUCCESS : ClientResponse.GRACEFUL_FAILURE, new VoltTable[] { }, err, task.clientHandle); }

Target:
private final ClientResponseImpl dispatchSubscribe(InvocationClientHandler handler, StoredProcedureInvocation task) { final ParameterSet ps = task.getParams(); final Object params[] = ps.toArray(); String err = null; final ClientInterfaceHandleManager cihm = m_cihm.get(handler.connectionId()); if (cihm == null) { return null; } for (int ii = 0; ii < params.length; ii++) { final Object param = params[ii]; if (param == null) { err = "Parameter index " + ii + " was null"; break; } if (!(param instanceof String)) { err = "Parameter index " + ii + " was not a String"; break; } if ("TOPOLOGY".equals(param)) { cihm.setWantsTopologyUpdates(true); } else { err = "Parameter \"" + param + "\" is not recognized/supported"; break; } } return new ClientResponseImpl( err == null ? ClientResponse.SUCCESS : ClientResponse.GRACEFUL_FAILURE, new VoltTable[] { }, err, task.clientHandle); }
Source:
public final boolean asBit(Object val) { String val0 = cast(val); if (val0.equalsIgnoreCase(BooleanConverter.TRUE)) { return true; } else if (val0.equalsIgnoreCase(BooleanConverter.FALSE)) { return false; } throw HazelcastSqlException.error(SqlErrorCode.DATA_EXCEPTION, "String literal cannot be converter to BIT: " + val); }

Target:
public final boolean asBit(Object val) { String val0 = cast(val); if (val0.equalsIgnoreCase(BooleanConverter.TRUE)) { return true; } else if (val0.equalsIgnoreCase(BooleanConverter.FALSE)) { return false; } throw HazelcastSqlException.error(SqlErrorCode.DATA_EXCEPTION, "VARCHAR value cannot be converted to BIT: " + val); }
Source:
public void testViolationsByVariableName() throws Exception { final String[] expected = { "19:11: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"), "35:11: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"), "51:11: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"), "58:11: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"), }; final Configuration checkConfig = getModuleConfig("EmptyCatchBlock"); final String filePath = getPath("InputEmptyCatchBlockViolationsByVariableName.java"); final Integer[] warnList = getLinesWithWarn(filePath); verify(checkConfig, filePath, expected, warnList); }

Target:
public void testViolationsByVariableName() throws Exception { final String[] expected = { "20:9: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"), "36:18: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"), "52:18: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"), "59:18: " + getCheckMessage(EmptyCatchBlockCheck.class, "catch.block.empty"), }; final Configuration checkConfig = getModuleConfig("EmptyCatchBlock"); final String filePath = getPath("InputEmptyCatchBlockViolationsByVariableName.java"); final Integer[] warnList = getLinesWithWarn(filePath); verify(checkConfig, filePath, expected, warnList); }
Source:
public void typePinDescription(String pinDescription) { waitForElementByElement(descriptionField); descriptionField.sendKeys(pinDescription); PageObjectLogging.log("typePinDescription", "Pin description was typed in", true); }

Target:
public void typePinDescription(String pinDescription) { waitForElementByElement(descriptionField); descriptionField.sendKeys(pinDescription); PageObjectLogging.log("typePinDescription", pinDescription + "Pin description was typed in", true); }
Source:
public Response createIssue(@Context HttpServletRequest request, @FormParam("title") String title, @FormParam("description") String description, @FormParam("assignee") String assigneeNetID) throws IOException{ Issue issue = new Issue(); issue.setTitle(title); issue.setDescription(description); issue.setOpen(true); User assignee = users.findByNetId(assigneeNetID); checkCollaborator(assignee); issue.setAssignee(assignee); issue.setTimestamp(new Date()); issue.setRepository(getRepositoryEntity()); issueBackend.createIssue(getRepositoryApi(getRepositoryEntity()), issue); return redirect(issue.getURI().toString()); }

Target:
public Response createIssue(@Context HttpServletRequest request, @FormParam("title") String title, @FormParam("description") String description, @FormParam("assignee") String assigneeNetID) throws IOException{ Issue issue = new Issue(); issue.setTitle(title); issue.setDescription(description); issue.setOpen(true); User assignee = users.findByNetId(assigneeNetID); checkCollaborator(assignee); issue.setAssignee(assignee); issue.setRepository(getRepositoryEntity()); issueBackend.createIssue(getRepositoryApi(getRepositoryEntity()), issue); return redirect(issue.getURI().toString()); }
Source:
private static Mson setFlipPageCommand(Mson mson, int pageHumanBased, int destinationPage, List<String> args, MassiveCommand command) { String number = String.valueOf(destinationPage); String oldNumber = String.valueOf(pageHumanBased); String commandLine; if (args != null) { List<String> arguments = new ArrayList<>(args); if (args.contains(oldNumber)) arguments.set(arguments.indexOf(oldNumber), number); else arguments.add(0,number); commandLine = command.getCommandLine(arguments); } else { commandLine = command.getCommandLine(number); } String tooltip = MsonEvent.command(commandLine).createTooltip(); commandLine = CmdMassiveCore.get().cmdMassiveCoreClick.getCommandLine(commandLine); mson = mson.command(commandLine); mson = mson.tooltip(tooltip); return mson; }

Target:
private static Mson setFlipPageCommand(Mson mson, int pageHumanBased, int destinationPage, List<String> args, MassiveCommand command) { String number = String.valueOf(destinationPage); String oldNumber = String.valueOf(pageHumanBased); String commandLine; if (args != null) { int pageParamIndex = command.getPageParameterIndex(); List<String> arguments = new ArrayList<>(args); if (pageParamIndex == -1) pageParamIndex = arguments.indexOf(oldNumber); if (pageParamIndex > -1 && pageParamIndex < arguments.size()) arguments.set(pageParamIndex, number); else arguments.add(0, number); commandLine = command.getCommandLine(arguments); } else { commandLine = command.getCommandLine(number); } String tooltip = MsonEvent.command(commandLine).createTooltip(); commandLine = CmdMassiveCore.get().cmdMassiveCoreClick.getCommandLine(commandLine); mson = mson.command(commandLine); mson = mson.tooltip(tooltip); return mson; }
Source:
private Class<?> loadRemoteClass(String name, Channel channel, ClassReference cr, RemoteClassLoader rcl) throws ClassNotFoundException { synchronized (rcl.getClassLoadingLock(name)) { Class<?> c = rcl.findLoadedClass(name); boolean interrupted = false; try { int tries = 0; while (tries < MAX_RETRIES) { tries++; try { invokeClassLoadTestingHookIfNeeded(); if (c != null) { return c; } Future<byte[]> img = cr.classImage.resolve(channel, name.replace('.', '/') + ".class"); if (img.isDone()) { try { return rcl.loadClassFile(name, img.get()); } catch (ExecutionException x) { } } return rcl.loadClassFile(name, proxy.fetch(name)); } catch (IOException x) { throw new ClassNotFoundException(name, x); } catch (InterruptedException x) { interrupted = true; try { rcl.getClassLoadingLock(name).wait(RETRY_SLEEP_DURATION_MILLISECONDS); } catch (InterruptedException e) { } LOGGER.finer("Handling interrupt while loading remote class. Current retry count = " + tries + ", maximum = " + MAX_RETRIES); } } throw new ClassNotFoundException("Could not load class " + name + " after " + MAX_RETRIES + " tries."); } finally { if (interrupted) Thread.currentThread().interrupt(); } } }

Target:
private Class<?> loadRemoteClass(String name, Channel channel, ClassReference cr, RemoteClassLoader rcl) throws ClassNotFoundException { synchronized (rcl.getClassLoadingLock(name)) { Class<?> c = rcl.findLoadedClass(name); int tries = 0; while (true) { try { invokeClassLoadTestingHookIfNeeded(); if (c != null) { return c; } Future<byte[]> img = cr.classImage.resolve(channel, name.replace('.', '/') + ".class"); if (img.isDone()) { try { return rcl.loadClassFile(name, img.get()); } catch (ExecutionException x) { } } return rcl.loadClassFile(name, proxy.fetch(name)); } catch (IOException x) { throw new ClassNotFoundException(name, x); } catch (InterruptedException | RemotingSystemException x) { tries++; if (shouldRetry(x, tries)) { sleepForRetry(); LOGGER.finer("Handling interrupt while loading remote class. Current retry count = " + tries + ", maximum = " + MAX_RETRIES); continue; } break; } } throw new ClassNotFoundException("Could not load class " + name + " after " + tries + " tries."); } }
Source:
public List<String> getApplicableMethodNames() { List<String> values = new ArrayList<String>(2); values.add("createSocket"); values.add("getInsecure"); return values; }

Target:
public List<String> getApplicableMethodNames() { return Arrays.asList("createSocket", "getInsecure"); }
Source:
public void applyUpdater(final INDArray gradient, final int iteration) { if (v == null) { throw new IllegalStateException("Updater has not been initialized with view state"); } final double momentum = config.getMomentum(); final double learningRate = config.getLearningRate(); final INDArray vPrev = v.dup(gradientReshapeOrder); vPrev.muli(momentum).subi(gradient.dup(gradientReshapeOrder).muli(learningRate)); gradient.addi(vPrev); }

Target:
public void applyUpdater(final INDArray gradient, final int iteration) { if (v == null) { throw new IllegalStateException("Updater has not been initialized with view state"); } final double momentum = config.getMomentum(); final double learningRate = config.getLearningRate(); v.muli(momentum).addi(gradient.dup(gradientReshapeOrder).muli(learningRate)); gradient.assign(vPrev); }
Source:
public void updateRepositoryConfiguration(TaskRepository taskRepository, IProgressMonitor monitor) throws CoreException { try { monitorMap.put(taskRepository.getId(), monitor != null ? OperationUtil.convert(monitor) : new NullOperationMonitor()); configurationCache.invalidate(taskRepository.getId()); configurationCache.get(taskRepository.getId()); } catch (ExecutionException e) { throw new CoreException(new Status(IStatus.ERROR, BugzillaRestCore.ID_PLUGIN, e.getMessage(), e)); } finally { monitorMap.remove(taskRepository.getId()); } }

Target:
public void updateRepositoryConfiguration(TaskRepository taskRepository, IProgressMonitor monitor) throws CoreException { monitorMap.put(taskRepository.getId(), monitor != null ? OperationUtil.convert(monitor) : new NullOperationMonitor()); configurationCache.refresh(taskRepository.getId()); monitorMap.remove(taskRepository.getId()); }