auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { Adaptor adaptor = new Adaptor() { @Override public void deserialize(GetField getField, Serializable serializable) throws Exception { final boolean caseSensitive = getField.get("_caseSensitive", true); { final Field caseSensitiveField = SimpleDictionary.class.getDeclaredField("_caseSensitive"); caseSensitiveField.setAccessible(true); caseSensitiveField.set(serializable, caseSensitive); } try { final Object oldValues = getField.get("_values", null); if (oldValues != null) { @SuppressWarnings("deprecation") SimpleReferenceValues srv = (SimpleReferenceValues) oldValues; @SuppressWarnings("deprecation") final Object[] values = srv.getValues(); final Set<String> valueSet = createValueSet(values, caseSensitive); final Field valuesField = SimpleDictionary.class.getDeclaredField("_valueSet"); valuesField.setAccessible(true); valuesField.set(serializable, valueSet); } } catch (IllegalArgumentException e) { } } }; ReadObjectBuilder.create(this, SimpleDictionary.class).readObject(stream, adaptor); }

Target:
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { final Adaptor adaptor = new Adaptor() { @Override public void deserialize(GetField getField, Serializable serializable) throws Exception { final boolean caseSensitive = getField.get("_caseSensitive", true); { final Field caseSensitiveField = SimpleDictionary.class.getDeclaredField("_caseSensitive"); caseSensitiveField.setAccessible(true); caseSensitiveField.set(serializable, caseSensitive); } try { final Object oldValues = getField.get("_values", null); if (oldValues != null) { @SuppressWarnings("deprecation") SimpleReferenceValues srv = (SimpleReferenceValues) oldValues; @SuppressWarnings("deprecation") final Object[] values = srv.getValues(); final Set<String> valueSet = createValueSet(values, caseSensitive); final Field valuesField = SimpleDictionary.class.getDeclaredField("_valueSet"); valuesField.setAccessible(true); valuesField.set(serializable, valueSet); } } catch (IllegalArgumentException e) { } } }; ReadObjectBuilder.create(this, SimpleDictionary.class).readObject(stream, adaptor); }
Source:
private int getMappingQualityImpl() { try { if (isAligned) { return getCurrentAlignment().getMappingQuality(); } } catch (ErrorMsg e) { throw new RuntimeException(e); } return SAMRecord.NO_ALIGNMENT_START; }

Target:
private int getMappingQualityImpl() { try { if (isAligned) { return getCurrentAlignment().getMappingQuality(); } } catch (ErrorMsg e) { throw new RuntimeException(e); } return SAMRecord.NO_MAPPING_QUALITY; }
Source:
public ShortUiColumn( final List<HeaderMetaData> headerMetaData, final double width, final boolean isResizable, final boolean isVisible, final GuidedDecisionTablePresenter.Access access, final TextBoxShortSingletonDOMElementFactory factory ) { super( headerMetaData, new CellRenderer<Short, NumericShortTextBox, TextBoxDOMElement<Short, NumericShortTextBox>>( factory ) { @Override protected void doRenderCellContent( final Text t, final Short value, final GridBodyCellRenderContext context ) { t.setText( value.toString() ); } }, width, isResizable, isVisible, access, factory ); }

Target:
public ShortUiColumn( final List<HeaderMetaData> headerMetaData, final double width, final boolean isResizable, final boolean isVisible, final GuidedDecisionTablePresenter.Access access, final TextBoxShortSingletonDOMElementFactory factory ) { super( headerMetaData, new CellRenderer<Short, NumericShortTextBox, TextBoxDOMElement<Short, NumericShortTextBox>>( factory ) { @Override protected void doRenderCellContent( final Text t, final Short value, final GridBodyCellRenderContext context ) { t.setText( ( (TextBoxShortSingletonDOMElementFactory) factory ).convert( value ) ); } }, width, isResizable, isVisible, access, factory ); }
Source:
public static void decreaseClientNum() throws InterruptedException { if (ACTIVE_CLIENT_COUNT.decrementAndGet() == 0) { VoltLogger.shutdownAsynchronousLogging(); EstTimeUpdater.stop(); ReverseDNSCache.stop(); } }

Target:
public static void decreaseClientNum() throws InterruptedException { int count = ACTIVE_CLIENT_COUNT.get(); if (count <= 0) { return; } if (ACTIVE_CLIENT_COUNT.decrementAndGet() == 0) { VoltLogger.shutdownAsynchronousLogging(); EstTimeUpdater.stop(); ReverseDNSCache.stop(); } count = ACTIVE_CLIENT_COUNT.get(); if (count < 0) { ACTIVE_CLIENT_COUNT.compareAndSet(count,0); } }
Source:
private Scenario createScenario(final Description testMethodDescription) { Scenario scenario = new Scenario(); String description = ""; String name = ScenarioConfiguration.getScenarioName(testMethodDescription, MultipleBuildsRule.getCurrentBuildRun()); scenario.setName(name); DocuDescription docuDescription = testMethodDescription.getAnnotation(DocuDescription.class); if (docuDescription != null) { description = docuDescription.description(); scenario.addDetail("User Role", docuDescription.userRole()); } scenario.setDescription(description); Labels labels = testMethodDescription.getAnnotation(Labels.class); if (labels != null) { Set<String> labelsSet = new HashSet<String>(); labelsSet.addAll(Arrays.asList(labels.value())); scenario.getLabels().setLabels(labelsSet); } UserStories userStories = testMethodDescription.getAnnotation(UserStories.class); if (userStories != null && userStories.value().length > 0) { long[] storyIds = userStories.value(); ObjectList<ObjectTreeNode<ObjectDescription>> featureEpicUserStoriesTrees = IssuesTrackingAccessHelper .loadFeatureTreesForWorkItemIds(storyIds); scenario.addDetail("Requirements", featureEpicUserStoriesTrees); } scenario.addDetail("Very Long Metadata Lines", createLongLine()); return scenario; }

Target:
private Scenario createScenario(final Description testMethodDescription) { Scenario scenario = new Scenario(); String description = ""; String name = getNameFromMethod(testMethodDescription); scenario.setName(name); DocuDescription docuDescription = testMethodDescription.getAnnotation(DocuDescription.class); if (docuDescription != null) { description = docuDescription.description(); scenario.addDetail("User Role", docuDescription.userRole()); } scenario.setDescription(description); Labels labels = testMethodDescription.getAnnotation(Labels.class); if (labels != null) { Set<String> labelsSet = new HashSet<String>(); labelsSet.addAll(Arrays.asList(labels.value())); scenario.getLabels().setLabels(labelsSet); } UserStories userStories = testMethodDescription.getAnnotation(UserStories.class); if (userStories != null && userStories.value().length > 0) { long[] storyIds = userStories.value(); ObjectList<ObjectTreeNode<ObjectDescription>> featureEpicUserStoriesTrees = IssuesTrackingAccessHelper .loadFeatureTreesForWorkItemIds(storyIds); scenario.addDetail("Requirements", featureEpicUserStoriesTrees); } scenario.addDetail("Very Long Metadata Lines", createLongLine()); return scenario; }
Source:
private void onStopRemoveBricks() { if (getConfirmWindow() == null) { return; } ConfirmationModel model = (ConfirmationModel) getConfirmWindow(); if (model.getProgress() != null) { return; } if (getSelectedItems() == null || getSelectedItems().isEmpty()) { return; } GlusterVolumeEntity volumeEntity = (GlusterVolumeEntity) getEntity(); ArrayList<GlusterBrickEntity> list = new ArrayList<GlusterBrickEntity>(); for (GlusterBrickEntity brick : volumeEntity.getBricks()) { if (brick.getAsyncTask() != null && brick.getAsyncTask().getStatus() == JobExecutionStatus.STARTED) { list.add(brick); } } GlusterVolumeRemoveBricksParameters parameter = new GlusterVolumeRemoveBricksParameters(volumeEntity.getId(), list); model.startProgress(null); Frontend.RunAction(VdcActionType.StopRemoveGlusterVolumeBricks, parameter, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); setConfirmWindow(null); } }, model); }

Target:
private void onStopRemoveBricks() { if (getConfirmWindow() == null) { return; } ConfirmationModel model = (ConfirmationModel) getConfirmWindow(); if (getSelectedItems() == null || getSelectedItems().isEmpty()) { return; } GlusterVolumeEntity volumeEntity = (GlusterVolumeEntity) getEntity(); ArrayList<GlusterBrickEntity> list = new ArrayList<GlusterBrickEntity>(); GlusterAsyncTask volumeTask = volumeEntity.getAsyncTask(); for (GlusterBrickEntity brick : volumeEntity.getBricks()) { if (brick.getAsyncTask() != null && brick.getAsyncTask().getTaskId() != null && volumeTask != null && volumeTask.getStatus() == JobExecutionStatus.STARTED) { list.add(brick); } } GlusterVolumeRemoveBricksParameters parameter = new GlusterVolumeRemoveBricksParameters(volumeEntity.getId(), list); model.startProgress(null); Frontend.RunAction(VdcActionType.StopRemoveGlusterVolumeBricks, parameter, new IFrontendActionAsyncCallback() { @Override public void executed(FrontendActionAsyncResult result) { ConfirmationModel localModel = (ConfirmationModel) result.getState(); localModel.stopProgress(); setConfirmWindow(null); } }, model); }
Source:
public void testIncludeTag() throws Exception { Repository localDb = createWorkRepository(); Repository tempDb = createWorkRepository(); StringBuilder xmlContent = new StringBuilder(); xmlContent.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") .append("<manifest>") .append("<include name=\"_include.xml\" />") .append("<default revision=\"master\" remote=\"remote1\" />") .append("</manifest>"); JGitTestUtil.writeTrashFile( tempDb, "manifest.xml", xmlContent.toString()); xmlContent = new StringBuilder(); xmlContent.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") .append("<manifest>") .append("<remote name=\"remote1\" fetch=\".\" />") .append("<default revision=\"master\" remote=\"remote1\" />") .append("<project path=\"foo\" name=\"") .append(defaultUri) .append("\" />") .append("</manifest>"); JGitTestUtil.writeTrashFile( tempDb, "manifest.xml", xmlContent.toString()); RepoCommand command = new RepoCommand(localDb); command .setPath(tempDb.getWorkTree().getAbsolutePath() + "/manifest.xml") .setURI(rootUri) .call(); File hello = new File(localDb.getWorkTree(), "foo/hello.txt"); assertTrue("submodule should be checked out", hello.exists()); BufferedReader reader = new BufferedReader(new FileReader(hello)); String content = reader.readLine(); reader.close(); assertEquals("submodule content should be as expected", "master world", content); }

Target:
public void testIncludeTag() throws Exception { Repository localDb = createWorkRepository(); Repository tempDb = createWorkRepository(); StringBuilder xmlContent = new StringBuilder(); xmlContent.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") .append("<manifest>") .append("<include name=\"_include.xml\" />") .append("<default revision=\"master\" remote=\"remote1\" />") .append("</manifest>"); JGitTestUtil.writeTrashFile( tempDb, "manifest.xml", xmlContent.toString()); xmlContent = new StringBuilder(); xmlContent.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") .append("<manifest>") .append("<remote name=\"remote1\" fetch=\".\" />") .append("<default revision=\"master\" remote=\"remote1\" />") .append("<project path=\"foo\" name=\"") .append(defaultUri) .append("\" />") .append("</manifest>"); JGitTestUtil.writeTrashFile( tempDb, "_include.xml", xmlContent.toString()); RepoCommand command = new RepoCommand(localDb); command .setPath(tempDb.getWorkTree().getAbsolutePath() + "/manifest.xml") .setURI(rootUri) .call(); File hello = new File(localDb.getWorkTree(), "foo/hello.txt"); assertTrue("submodule should be checked out", hello.exists()); BufferedReader reader = new BufferedReader(new FileReader(hello)); String content = reader.readLine(); reader.close(); assertEquals("submodule content should be as expected", "master world", content); }
Source:
public void testExternalZookeeperWithExternalNetwork() throws Exception { try ( Network network = Network.newNetwork(); KafkaContainer kafka = new KafkaContainer(KAFKA_TEST_IMAGE) .withNetwork(network) .withExternalZookeeper("zookeeper:2181"); GenericContainer<?> zookeeper = new GenericContainer<>(ZOOKEEPER_TEST_IMAGE) .withNetwork(network) .withNetworkAliases("zookeeper") .withEnv("ZOOKEEPER_CLIENT_PORT", "2181"); GenericContainer application = new GenericContainer("alpine") .withNetwork(kafka.getNetwork()) .withNetworkAliases("dummy") .withCommand("sleep 10000") ) { zookeeper.start(); kafka.start(); application.start(); testKafkaFunctionality(kafka.getBootstrapServers()); } }

Target:
public void testExternalZookeeperWithExternalNetwork() throws Exception { try ( Network network = Network.newNetwork(); KafkaContainer kafka = new KafkaContainer(KAFKA_TEST_IMAGE) .withNetwork(network) .withExternalZookeeper("zookeeper:2181"); GenericContainer<?> zookeeper = new GenericContainer<>(ZOOKEEPER_TEST_IMAGE) .withNetwork(network) .withNetworkAliases("zookeeper") .withEnv("ZOOKEEPER_CLIENT_PORT", "2181"); GenericContainer<?> application = new GenericContainer<>(DockerImageName.parse("alpine")) .withNetwork(network) .withNetworkAliases("dummy") .withCommand("sleep 10000") ) { zookeeper.start(); kafka.start(); application.start(); testKafkaFunctionality(kafka.getBootstrapServers()); } }
Source:
protected void onStop() { if (themeChooser != null && themeChooser.isShowing()) { themeChooser.dismiss(); } app.getSessionFunnel().persistSession(); if (textToSpeech.isSpeaking()) { getCurPageFragment().stopSpeakArticle(textToSpeech); } super.onStop(); unregisterBus(); }

Target:
protected void onStop() { if (themeChooser != null && themeChooser.isShowing()) { themeChooser.dismiss(); } app.getSessionFunnel().persistSession(); if (textToSpeech.isSpeaking()) { getCurPageFragment().stopSpeakArticle(textToSpeech); textToSpeech.shutdown(); } super.onStop(); unregisterBus(); }
Source:
public void handleSetClockConfigurationResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception) { LOGGER.info("handleSetClockConfigurationResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error("Set Clock Configuration Response not ok. Unexpected Exception", exception); result = ResponseMessageResultType.NOT_OK; } this.webServiceResponseMessageSender.send(ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(), deviceMessageMetadata.getMessageType()); }

Target:
public void handleSetClockConfigurationResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception) { LOGGER.info("handleSetClockConfigurationResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error("Set Clock Configuration Response not ok. Unexpected Exception", exception); result = ResponseMessageResultType.NOT_OK; } ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(); this.webServiceResponseMessageSender.send(responseMessage, deviceMessageMetadata.getMessageType()); }
Source:
public Number apply(List<Expr> args, Map<String, Number> bindings) { if (args.size() < 3) { throw new RuntimeException("function 'caseWhen' needs at least 3 arguments"); } for (int i = 0; i < args.size(); i += 2) { Number x = args.get(i).eval(bindings); if (x instanceof Long && x.longValue() > 0 || x.doubleValue() > 0) { return args.get(i + 1).eval(bindings); } } if (args.size() % 2 != 0) { return args.get(args.size() - 1).eval(bindings); } return 0; }

Target:
public Number apply(List<Expr> args, Map<String, Number> bindings) { if (args.size() < 3) { throw new RuntimeException("function 'case' needs at least 3 arguments"); } final Number leftVal = args.get(0).eval(bindings); for (int i = 1; i < args.size() - 1; i += 2) { Number x = Evals.eq(leftVal, args.get(i).eval(bindings)); if (x instanceof Long && x.longValue() > 0 || x.doubleValue() > 0) { return args.get(i + 1).eval(bindings); } } if (args.size() % 2 != 1) { return args.get(args.size() - 1).eval(bindings); } return leftVal instanceof Long ? 0L : 0.0d; }
Source:
public void publishLiveProcessorList(List<String> processors, String leaseId) { try { byte[] data = SamzaObjectMapper.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsBytes(processors); byte[] pageData = Arrays.copyOf(data, (int) BARRIER_STATE_BLOCK_SIZE); InputStream is = new ByteArrayInputStream(pageData); blob.uploadPages(is, JOB_MODEL_BLOCK_SIZE + BARRIER_STATE_BLOCK_SIZE, PROCESSOR_LIST_BLOCK_SIZE, AccessCondition.generateLeaseCondition(leaseId), null, null); LOG.info("Uploaded list of live processors to blob."); } catch (StorageException | IOException e) { LOG.error("Processor list: " + processors + "publish failed", e); throw new AzureException(e); } }

Target:
public boolean publishLiveProcessorList(List<String> processors, String leaseId) { try { if (leaseId == null) { return false; } byte[] data = SamzaObjectMapper.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsBytes(processors); byte[] pageData = Arrays.copyOf(data, (int) BARRIER_STATE_BLOCK_SIZE); InputStream is = new ByteArrayInputStream(pageData); blob.uploadPages(is, JOB_MODEL_BLOCK_SIZE + BARRIER_STATE_BLOCK_SIZE, PROCESSOR_LIST_BLOCK_SIZE, AccessCondition.generateLeaseCondition(leaseId), null, null); LOG.info("Uploaded list of live processors to blob."); return true; } catch (StorageException | IOException e) { LOG.error("Processor list: " + processors + "publish failed", e); return false; } }
Source:
public HadoopDruidIndexerConfig( final @JsonProperty("spec") HadoopIngestionSpec spec, final @JsonProperty("schema") HadoopIngestionSpec schema ) { if (schema != null) { this.spec = schema; } else { this.spec = spec; } this.pathSpec = jsonMapper.convertValue(this.spec.getIOConfig().getPathSpec(), PathSpec.class); for (Map.Entry<DateTime, List<HadoopyShardSpec>> entry : spec.getTuningConfig().getShardSpecs().entrySet()) { if (entry.getValue() == null || entry.getValue().isEmpty()) { continue; } final ShardSpec actualSpec = entry.getValue().get(0).getActualSpec(); shardSpecLookups.put( entry.getKey(), actualSpec.getLookup( Lists.transform( entry.getValue(), new Function<HadoopyShardSpec, ShardSpec>() { @Override public ShardSpec apply(HadoopyShardSpec input) { return input.getActualSpec(); } } ) ) ); for (HadoopyShardSpec hadoopyShardSpec : entry.getValue()) { hadoopShardSpecLookup.put(hadoopyShardSpec.getActualSpec(), hadoopyShardSpec); } } this.rollupGran = this.spec.getDataSchema().getGranularitySpec().getQueryGranularity(); }

Target:
public HadoopDruidIndexerConfig( final @JsonProperty("spec") HadoopIngestionSpec spec, final @JsonProperty("schema") HadoopIngestionSpec schema ) { if (spec != null) { this.spec = spec; } else { this.spec = schema; } this.pathSpec = jsonMapper.convertValue(this.spec.getIOConfig().getPathSpec(), PathSpec.class); for (Map.Entry<DateTime, List<HadoopyShardSpec>> entry : spec.getTuningConfig().getShardSpecs().entrySet()) { if (entry.getValue() == null || entry.getValue().isEmpty()) { continue; } final ShardSpec actualSpec = entry.getValue().get(0).getActualSpec(); shardSpecLookups.put( entry.getKey(), actualSpec.getLookup( Lists.transform( entry.getValue(), new Function<HadoopyShardSpec, ShardSpec>() { @Override public ShardSpec apply(HadoopyShardSpec input) { return input.getActualSpec(); } } ) ) ); for (HadoopyShardSpec hadoopyShardSpec : entry.getValue()) { hadoopShardSpecLookup.put(hadoopyShardSpec.getActualSpec(), hadoopyShardSpec); } } this.rollupGran = this.spec.getDataSchema().getGranularitySpec().getQueryGranularity(); }
Source:
public boolean test(final Node<? extends View<?>, ? extends Edge> nodeA, final Node<? extends View<?>, ? extends Edge> nodeB) { checkNotNull("nodeA", nodeA); checkNotNull("nodeB", nodeB); final Optional<Element<?>> parentInstance = getParentInstance(nodeA, parentType); Optional<Element<?>> parentInstanceB = getParentInstance(nodeB, parentType); boolean b = (parentInstance.isPresent() && parentInstanceB.isPresent()) && (Objects.equals(parentInstance.get(), parentInstanceB.get())) && (hasParent(nodeA, parentInstance.get()) && hasParent(nodeB, parentInstance.get())); return b; }

Target:
public boolean test(final Node<? extends View<?>, ? extends Edge> nodeA, final Node<? extends View<?>, ? extends Edge> nodeB) { checkNotNull("nodeA", nodeA); checkNotNull("nodeB", nodeB); final Optional<Element<?>> parentInstanceA = getParentInstance(nodeA, parentType); final Optional<Element<?>> parentInstanceB = getParentInstance(nodeB, parentType); return (parentInstanceA.isPresent() && parentInstanceB.isPresent()) && (Objects.equals(parentInstanceA.get(), parentInstanceB.get())) && (hasParent(nodeA, parentInstanceA.get()) && hasParent(nodeB, parentInstanceB.get())); }
Source:
public int hashCode() { return operand != null ? operand.hashCode() : 0; }

Target:
public int hashCode() { return operand.hashCode(); }
Source:
public static void destroyAll(ManagementContext mgmt) { Exception error = null; if (mgmt instanceof NonDeploymentManagementContext) { log.warn("Entities.destroyAll invoked on non-deployment "+mgmt+" - not likely to have much effect!"); } if (!mgmt.isRunning()) return; log.debug("destroying all apps in "+mgmt+": "+mgmt.getApplications()); for (Application app: mgmt.getApplications()) { log.debug("destroying app "+app+" (managed? "+isManaged(app)+"; mgmt is "+mgmt+")"); try { destroy(app); log.debug("destroyed app "+app+"; mgmt now "+mgmt); } catch (Exception e) { log.warn("problems destroying app "+app+" (mgmt now "+mgmt+", will rethrow at least one exception): "+e); if (error==null) error = e; } } if (mgmt instanceof ManagementContextInternal) ((ManagementContextInternal)mgmt).terminate(); if (error!=null) throw Exceptions.propagate(error); }

Target:
public static void destroyAll(ManagementContext mgmt) { Exception error = null; if (mgmt instanceof NonDeploymentManagementContext) { log.warn("Entities.destroyAll invoked on non-deployment "+mgmt+" - not likely to have much effect! " + "(This usually means the mgmt context has been taken from entity has been destroyed. " + "To destroy other things on the management context ensure you keep a handle to the context " + "before the entity is destroyed, such as by creating the management context first.)"); } if (!mgmt.isRunning()) return; log.debug("destroying all apps in "+mgmt+": "+mgmt.getApplications()); for (Application app: mgmt.getApplications()) { log.debug("destroying app "+app+" (managed? "+isManaged(app)+"; mgmt is "+mgmt+")"); try { destroy(app); log.debug("destroyed app "+app+"; mgmt now "+mgmt); } catch (Exception e) { log.warn("problems destroying app "+app+" (mgmt now "+mgmt+", will rethrow at least one exception): "+e); if (error==null) error = e; } } if (mgmt instanceof ManagementContextInternal) ((ManagementContextInternal)mgmt).terminate(); if (error!=null) throw Exceptions.propagate(error); }
Source:
private void showEmailAutoCompleteHint() { try { startIntentSenderForResult(getEmailHintIntent().getIntentSender(), RC_HINT, null, 0, 0, 0, null); } catch (IntentSender.SendIntentException e) { Log.e(TAG, "Unable to start hint intent", e); } }

Target:
private void showEmailAutoCompleteHint() { try { mHelper.startIntentSenderForResult(getEmailHintIntent().getIntentSender(), RC_HINT); } catch (IntentSender.SendIntentException e) { Log.e(TAG, "Unable to start hint intent", e); } }
Source:
protected void init(final Repository repository, final String gitDir) { try { final String outputEncoding = repository != null ? repository .getConfig() .getString("i18n", null, "logOutputEncoding") : null; if (outputEncoding != null) out = new PrintWriter(new OutputStreamWriter(System.out, outputEncoding)); else out = new PrintWriter(new OutputStreamWriter(System.out)); } catch (IOException e) { throw die(CLIText.get().cannotCreateOutputStream); } if (repository != null && repository.getDirectory() != null) { db = repository; gitdir = repository.getDirectory().getAbsolutePath(); } else { db = repository; gitdir = gitDir; } }

Target:
protected void init(final Repository repository, final String gitDir) { try { final String outputEncoding = repository != null ? repository .getConfig() .getString("i18n", null, "logOutputEncoding") : null; if (outputEncoding != null) out = new PrintWriter(new BufferedWriter( new OutputStreamWriter(System.out, outputEncoding))); else out = new PrintWriter(new BufferedWriter( new OutputStreamWriter(System.out))); } catch (IOException e) { throw die(CLIText.get().cannotCreateOutputStream); } if (repository != null && repository.getDirectory() != null) { db = repository; gitdir = repository.getDirectory().getAbsolutePath(); } else { db = repository; gitdir = gitDir; } }
Source:
public void applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor, DirectoryBasedIndexManager indexManager) { IndexUpdateStreamCommand streamCommand = new IndexUpdateStreamCommand(cacheName); byte[] serializedModel = indexManager.getSerializer().toSerializedModel(Collections.singletonList(singleOperation)); streamCommand.setSerializedWorkList(serializedModel); streamCommand.setIndexName(this.indexName); sendCommand(streamCommand,Collections.singletonList(singleOperation)); }

Target:
public void applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor, DirectoryBasedIndexManager indexManager) { final IndexUpdateStreamCommand streamCommand = new IndexUpdateStreamCommand(cacheName); final List<LuceneWork> operations = Collections.singletonList(singleOperation); final byte[] serializedModel = indexManager.getSerializer().toSerializedModel(operations); streamCommand.setSerializedWorkList(serializedModel); streamCommand.setIndexName(this.indexName); sendCommand(streamCommand, operations); }
Source:
public static String minWindow(String s, String t) { if(s.length() == 0 || t.length() ==0 || s.length() < t.length()) { return ""; } HashMap<Character, Integer> map = new HashMap<Character, Integer>(); for(char c : t.toCharArray()) { if(map.containsKey(c)) { map.put(c, map.get(c) + 1); } else { map.put(c, 1); } } int left = 0; int count = 0; int minStart = 0; int minLength = s.length() + 1; for(int right = 0; right < s.length(); right++) { if(map.containsKey(s.charAt(right))) { map.put(s.charAt(right), map.get(s.charAt(right)) - 1); if(map.get(s.charAt(right)) >= 0) { count++; } while(count == t.length()) { if((right - left + 1) < minLength) { minStart = left; minLength = right - left + 1; } if(map.containsKey(s.charAt(left))) { map.put(s.charAt(left), map.get(s.charAt(left)) + 1 ); if(map.get(s.charAt(left)) > 0) { count--; } } left ++; } } } if(minLength == s.length()+1) { return ""; } return s.substring(minStart, minStart + minLength); }

Target:
public static String minWindow(String s, String t) { if(s.length() == 0 || t.length() ==0 || s.length() < t.length()) { return ""; } HashMap<Character, Integer> map = new HashMap<Character, Integer>(); for(char c : t.toCharArray()) { map.put(c, (map.containsKey(c) ? map.get(c) : 0) + 1); } int left = 0; int count = 0; int minStart = 0; int minLength = s.length() + 1; for(int right = 0; right < s.length(); right++) { if(map.containsKey(s.charAt(right))) { map.put(s.charAt(right), map.get(s.charAt(right)) - 1); if(map.get(s.charAt(right)) >= 0) { count++; } while(count == t.length()) { if((right - left + 1) < minLength) { minStart = left; minLength = right - left + 1; } if(map.containsKey(s.charAt(left))) { map.put(s.charAt(left), map.get(s.charAt(left)) + 1 ); if(map.get(s.charAt(left)) > 0) { count--; } } left++; } } } if(minLength == s.length()+1) { return ""; } return s.substring(minStart, minStart + minLength); }
Source:
private void getMasterLock(final String zMasterLoc) throws KeeperException, InterruptedException { log.info("Acquiring Master lock"); final String masterClientAddress = hostname + ":" + getConfiguration().getPort(Property.MASTER_CLIENTPORT)[0]; while (true) { MasterLockWatcher masterLockWatcher = new MasterLockWatcher(); masterLock = new ZooLock(zMasterLoc); masterLock.lockAsync(masterLockWatcher, masterClientAddress.getBytes()); masterLockWatcher.waitForChange(); if (masterLockWatcher.acquiredLock) { break; } if (!masterLockWatcher.failedToAcquireLock) { throw new IllegalStateException("master lock in unknown state"); } masterLock.tryToCancelAsyncLockOrUnlock(); sleepUninterruptibly(TIME_TO_WAIT_BETWEEN_LOCK_CHECKS, TimeUnit.MILLISECONDS); } log.info("Got Master lock."); setMasterState(MasterState.HAVE_LOCK); }

Target:
private void getMasterLock(final String zMasterLoc) throws KeeperException, InterruptedException { log.info("Attempting to acquire Master Lock"); final String masterClientAddress = hostname + ":" + getConfiguration().getPort(Property.MASTER_CLIENTPORT)[0]; while (true) { MasterLockWatcher masterLockWatcher = new MasterLockWatcher(); masterLock = new ZooLock(zMasterLoc); masterLock.lockAsync(masterLockWatcher, masterClientAddress.getBytes()); masterLockWatcher.waitForChange(); if (masterLockWatcher.acquiredLock) { break; } if (!masterLockWatcher.failedToAcquireLock) { throw new IllegalStateException("master lock in unknown state"); } masterLock.tryToCancelAsyncLockOrUnlock(); sleepUninterruptibly(TIME_TO_WAIT_BETWEEN_LOCK_CHECKS, TimeUnit.MILLISECONDS); } log.info("Acquired Master Lock"); setMasterState(MasterState.HAVE_LOCK); }
Source:
public void testGetVersion() throws Exception { assertTrue(atsVersionCache.getVersion(teamWf).getName().equals("Test Version")); }

Target:
public void testGetVersion() throws Exception { assertEquals("Test Version", atsVersionCache.getVersion(teamWf).getName()); }
Source:
public IsaacApplicationRegister() { singletons = new HashSet<Object>(); SegueGuiceConfigurationModule segueGuiceConfigurationModule = new SegueGuiceConfigurationModule(); IsaacGuiceConfigurationModule isaacGuiceConfigurationModule = new IsaacGuiceConfigurationModule(); injector = Guice.createInjector(isaacGuiceConfigurationModule, segueGuiceConfigurationModule); SegueConfigurationModule segueConfigurationModule = injector.getInstance(SegueConfigurationModule.class); ContentMapper mapper = injector.getInstance(ContentMapper.class); if (segueConfigurationModule != null) { log.info("Registering isaac specific datatypes with the segue content mapper."); mapper.registerJsonTypes(segueConfigurationModule.getContentDataTransferObjectMap()); } setupMetricsExporter(); setupSwaggerApiAdvertiser(); }

Target:
public IsaacApplicationRegister() { singletons = new HashSet<Object>(); SegueGuiceConfigurationModule segueGuiceConfigurationModule = new SegueGuiceConfigurationModule(); IsaacGuiceConfigurationModule isaacGuiceConfigurationModule = new IsaacGuiceConfigurationModule(); injector = Guice.createInjector(isaacGuiceConfigurationModule, segueGuiceConfigurationModule); SegueConfigurationModule segueConfigurationModule = injector.getInstance(SegueConfigurationModule.class); ContentMapper mapper = injector.getInstance(ContentMapper.class); if (segueConfigurationModule != null) { log.info("Registering isaac specific datatypes with the segue content mapper."); mapper.registerJsonTypes(segueConfigurationModule.getContentDataTransferObjectMap()); } setupSwaggerApiAdvertiser(); }
Source:
public void handleMessage(Message message) throws Fault { LOG.trace("Begin HttpHeaderRequestOutInterceptor"); Map<String, List> headers = (Map<String, List>) message.get(Message.PROTOCOL_HEADERS); if(headers == null) { headers = new HashMap<>(); } final Map<String, String> customHttpHeaders = getCustomHttpHeaders(message); if(customHttpHeaders != null && !customHttpHeaders.isEmpty()) { for(String key : customHttpHeaders.keySet()) { String value = customHttpHeaders.get(key); headers.put(key, Collections.singletonList(value)); LOG.debug("Adding custom CONNECT HTTP header: " , key, ", ", value); } } message.put(Message.PROTOCOL_HEADERS, headers); }

Target:
public void handleMessage(Message message) { LOG.trace("Begin HttpHeaderRequestOutInterceptor"); Map<String, List> headers = (Map<String, List>) message.get(Message.PROTOCOL_HEADERS); if(headers == null) { headers = new HashMap<>(); } final Map<String, String> customHttpHeaders = getCustomHttpHeaders(message); if(MapUtils.isNotEmpty(customHttpHeaders)) { for(Entry<String,String> entry : customHttpHeaders.entrySet()) { headers.put(entry.getKey(), Collections.singletonList(entry.getValue())); LOG.debug("Adding custom CONNECT HTTP header: {}, {}" , entry.getKey(), entry.getValue()); } } message.put(Message.PROTOCOL_HEADERS, headers); }
Source:
public void onActivate(ActivateEvent event, EntityRef entity) { LASTeam teleporterTeamComponent = entity.getComponent(LASTeam.class); EntityRef player = event.getInstigator(); LASTeam playerTeamComponent = player.getComponent(LASTeam.class); if (teleporterTeamComponent.team.equals("red")) { playerTeamComponent.team = "red"; player.send(new CharacterTeleportEvent(new Vector3f(RED_TELEPORT_DESTINATION))); } if (teleporterTeamComponent.team.equals("black")) { playerTeamComponent.team = "black"; player.send(new CharacterTeleportEvent(new Vector3f(BLACK_TELEPORT_DESTINATION))); } }

Target:
public void onActivate(ActivateEvent event, EntityRef entity) { LASTeam teleporterTeamComponent = entity.getComponent(LASTeam.class); EntityRef player = event.getInstigator(); LASTeam playerTeamComponent = player.getComponent(LASTeam.class); if (teleporterTeamComponent.team.equals(teleporterTeamComponent.RED)) { playerTeamComponent.team = teleporterTeamComponent.team; player.saveComponent(playerTeamComponent); player.send(new CharacterTeleportEvent(new Vector3f(RED_TELEPORT_DESTINATION))); } if (teleporterTeamComponent.team.equals(teleporterTeamComponent.BLACK)) { playerTeamComponent.team = teleporterTeamComponent.team; player.saveComponent(playerTeamComponent); player.send(new CharacterTeleportEvent(new Vector3f(BLACK_TELEPORT_DESTINATION))); } }
Source:
public synchronized PublisherSession newSession() { Window<PublisherPush> it = pushStream.newIterator(2); PublisherSession session = new PublisherSession(it, generator .generate()); sessions.put(session.getKey(), session); return session; }

Target:
public synchronized PublisherSession newSession() { Window it = pushStream.newWindow(sessionRollbackCount); PublisherSession session = new PublisherSession(it, generator .generate()); sessions.put(session.getKey(), session); return session; }
Source:
public void testLeakingInstanceAfterClose() throws Exception { final String file= "/ceditor/src/main.cpp"; fCProject= EditorTestHelper.createCProject("ceditor", "resources/ceditor", false, false); setUpEditor(file); fSourceViewer= EditorTestHelper.getSourceViewer(fEditor); assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100)); WeakReference<CEditor> ref = new WeakReference<>(fEditor); EditorTestHelper.closeEditor(fEditor); fEditor = null; fSourceViewer = null; int ngc = 10; while (ref.get() != null && ngc-- > 0) { System.gc(); EditorTestHelper.runEventQueue(20000); } assertNull("CEditor instance seems to be leaking after close", ref.get()); }

Target:
public void testLeakingInstanceAfterClose() throws Exception { final String file= "/ceditor/src/main.cpp"; fCProject= EditorTestHelper.createCProject("ceditor", "resources/ceditor", false, false); setUpEditor(file); fSourceViewer= EditorTestHelper.getSourceViewer(fEditor); assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100)); WeakReference<CEditor> ref = new WeakReference<>(fEditor); EditorTestHelper.closeEditor(fEditor); fEditor = null; fSourceViewer = null; int ngc = 10; while (ref.get() != null && ngc-- > 0) { System.gc(); EditorTestHelper.runEventQueue(200); } assertNull("CEditor instance seems to be leaking after close", ref.get()); }
Source:
protected Object encode(ChannelHandlerContext ctx, Channel channel, Object message) throws Exception { if (message instanceof ControlMessage) { ControlMessage controlMessage = (ControlMessage) message; switch (controlMessage.getKind()) { case PREPARED: return encodePreparedMessage(ctx, channel, (PreparedMessage) controlMessage); case STARTED: return encodeStartedMessage(ctx, channel, (StartedMessage) controlMessage); case ERROR: return encodeErrorMessage(ctx, channel, (ErrorMessage) controlMessage); case FINISHED: return encodeFinishedMessage(ctx, channel, (FinishedMessage) controlMessage); case NOTIFY: return encodeNotifyMessage(ctx, channel, (NotifyMessage) controlMessage); case NOTIFIED: return encodiedNotifiedMessage(ctx, channel, (NotifiedMessage) controlMessage); default: break; } } return message; }

Target:
protected Object encode(ChannelHandlerContext ctx, Channel channel, Object message) throws Exception { if (message instanceof ControlMessage) { ControlMessage controlMessage = (ControlMessage) message; switch (controlMessage.getKind()) { case PREPARED: return encodePreparedMessage(ctx, channel, (PreparedMessage) controlMessage); case STARTED: return encodeStartedMessage(ctx, channel, (StartedMessage) controlMessage); case ERROR: return encodeErrorMessage(ctx, channel, (ErrorMessage) controlMessage); case FINISHED: return encodeFinishedMessage(ctx, channel, (FinishedMessage) controlMessage); case NOTIFY: return encodeNotifyMessage(ctx, channel, (NotifyMessage) controlMessage); case NOTIFIED: return encodedNotifiedMessage(ctx, channel, (NotifiedMessage) controlMessage); default: break; } } return message; }
Source:
public static void main(String[] args) { String queueURL = String.format("<LINK_0>", ACCOUNT_NAME, QUEUE_NAME, SAS_TOKEN); QueueAsyncClient queueAsyncClient = new QueueClientBuilder().endpoint(queueURL).buildAsyncClient(); queueAsyncClient.create() .flatMap(response -> queueAsyncClient.enqueueMessage("This is message 1")) .flatMap(response -> queueAsyncClient.enqueueMessage("This is message 2")) .subscribe( response -> { System.out.println("Message successfully equeueed by queueAsyncClient. Message id:" + response.value().messageId()); }, err -> { System.out.println("Error thrown when enqueue the message. Error message: " + err.getMessage()); }, () -> { System.out.println("The enqueue has been completed."); } ); }

Target:
public static void main(String[] args) { String queueURL = String.format("<LINK_0>", ACCOUNT_NAME, QUEUE_NAME, SAS_TOKEN); QueueAsyncClient queueAsyncClient = new QueueClientBuilder().endpoint(queueURL).buildAsyncClient(); queueAsyncClient.create() .doOnSuccess(response -> queueAsyncClient.enqueueMessage("This is message 1")) .then(queueAsyncClient.enqueueMessage("This is message 2")) .subscribe( response -> { System.out.println("Message successfully equeueed by queueAsyncClient. Message id:" + response.value().messageId()); }, err -> { System.out.println("Error thrown when enqueue the message. Error message: " + err.getMessage()); }, () -> { System.out.println("The enqueue has been completed."); } ); }
Source:
public Sample(long timeMillis, double numericValue, String textValue) { setTimeMillis(timeMillis); setNumericValue(numericValue); this.textValue = textValue; }

Target:
public Sample(long timeMillis, double numericValue, String textValue) { this(timeMillis, null, null, textValue); setNumericValueFromDouble(numericValue); }
Source:
public FileObject addDescription(InputStream sourceMdStream, String sourceProfile, InputStream modsStream) { fileObj = createFileObject(); BinaryObject orig = fileObj.addOriginalFile(sourceMdStream, null, "text/plain", null); repository.createRelationship(pid, PcdmModels.hasRelatedObject, orig.getResource()); orig.getResource().addProperty(Cdr.hasSourceMetadataProfile, sourceProfile); BinaryObject mods = fileObj.addDerivative(null, modsStream, null, "text/plain", null); repository.createRelationship(pid, IanaRelation.describedby, mods.getResource()); return fileObj; }

Target:
public FileObject addDescription(InputStream sourceMdStream, String sourceProfile, InputStream modsStream) throws InvalidRelationshipException { if (sourceProfile == null || sourceProfile == "") { throw new InvalidRelationshipException("No source profile was provided"); } FileObject fileObj = createFileObject(); BinaryObject orig = fileObj.addOriginalFile(sourceMdStream, null, "text/plain", null); repository.createProperty(orig.getPid(), Cdr.hasSourceMetadataProfile, sourceProfile); repository.createRelationship(orig.getPid(), RDF.type, Cdr.SourceMetadata); repository.createRelationship(pid, PcdmModels.hasRelatedObject, fileObj.getResource()); BinaryObject mods = fileObj.addDerivative(null, modsStream, null, "text/plain", null); repository.createRelationship(pid, Cdr.hasMods, mods.getResource()); return fileObj; }
Source:
private boolean containsNullOrEmpty(List<String> values) { if(values == null) return true ; if(values.isEmpty()) return true ; for(String str : values) { if(StringUtils.isBlank(str)) return true ; } return false; }

Target:
private boolean containsNullOrEmpty(List<String> values) { if(values == null || values.isEmpty()) return true ; for(String str : values) { if(StringUtils.isBlank(str)) return true ; } return false; }
Source:
public boolean pingAllEndpoint() { refreshCacheEndpoints(); if (CollectionUtils.isEmpty(endpoints)) { LOG.debug("ping-all connection-endpoints: none found."); return false; } endpoints.contains(selectedEndpoint); for (ConnectionEndpoint connEndpoint : endpoints) { exchangeService.pingService(connEndpoint); } return true; }

Target:
public boolean pingAllEndpoint() { refreshCacheEndpoints(); if (CollectionUtils.isEmpty(endpoints)) { LOG.debug("ping-all connection-endpoints: none found."); return false; } for (ConnectionEndpoint connEndpoint : endpoints) { exchangeService.pingService(connEndpoint); } return true; }
Source:
public static <T> T createInstance(String clazz, Object... args) { try { Class classObj = Class.forName(clazz); Class[] argTypes = new Class[args.length]; IntStream.range(0, args.length).forEach(i -> argTypes[i] = args[i].getClass()); Constructor<T> ctor = classObj.getDeclaredConstructor(argTypes); return ctor.newInstance(args); } catch (Exception e) { return null; } }

Target:
public static <T> T createInstance(String clazz, Object... args) { Objects.requireNonNull(clazz, "null class name"); try { Class classObj = Class.forName(clazz); Class[] argTypes = new Class[args.length]; IntStream.range(0, args.length).forEach(i -> argTypes[i] = args[i].getClass()); Constructor<T> ctor = classObj.getDeclaredConstructor(argTypes); return ctor.newInstance(args); } catch (Exception e) { return null; } }
Source:
public void connectWithRetry(ExecutorService executorService) { tryConnect = true; try { connect(); isConnected = true; } catch (ConnectionUnavailableException | RuntimeException e) { log.error(e.getMessage(), e); } }

Target:
public void connectWithRetry(ExecutorService executorService) { tryConnect = true; try { connect(); isConnected.set(true); } catch (ConnectionUnavailableException | RuntimeException e) { log.error(e.getMessage(), e); } }
Source:
private boolean hasGlobalPermission(String userName, Permission permission, RoleBasedAuthorizationStrategy rbas) { LOGGER.debug("Check the global permission of the user " + userName + " " + rbas.getGrantedRoles(RoleBasedAuthorizationStrategy.GLOBAL)); return hasPermission(userName, permission, rbas.getGrantedRoles(RoleBasedAuthorizationStrategy.GLOBAL)); }

Target:
private boolean hasGlobalPermission(String userName, Permission permission, RoleBasedAuthorizationStrategy rbas) { return hasPermission(userName, permission, rbas.getGrantedRoles(RoleBasedAuthorizationStrategy.GLOBAL)); }
Source:
static Object[] regionAndGatewayTypes() { ArrayList<Object[]> parameters = new ArrayList<>(); parameters.add(new Object[] {RegionShortcut.PARTITION, true}); parameters.add(new Object[] {RegionShortcut.REPLICATE, false}); return parameters.toArray(); }

Target:
static Object[] regionAndGatewayTypes() { ArrayList<Object[]> parameters = new ArrayList<>(); parameters.add(new Object[] {RegionShortcut.PARTITION, true}); parameters.add(new Object[] {RegionShortcut.PARTITION, false}); parameters.add(new Object[] {RegionShortcut.REPLICATE, false}); return parameters.toArray(); }
Source:
public Map<String, String> getFacts() { return facts; }

Target:
public Map<String, String> getFacts() { return this.facts != null ? new MapView<String, String>(facts) : null; }
Source:
public void windowClosed(IWorkbenchWindow window) { IWorkbenchWindow windows[] = PlatformUI.getWorkbench() .getWorkbenchWindows(); if (windows.length > 1) { return; } ILaunchManager manager = DebugPlugin.getDefault() .getLaunchManager(); ILaunchConfigurationType programType = manager .getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE); if (programType == null) { return; } ILaunch launches[] = manager.getLaunches(); ILaunchConfigurationType configType; ILaunchConfiguration config; for (ILaunch launche : launches) { try { config = launche.getLaunchConfiguration(); if (config == null) { continue; } configType = config.getType(); }catch (CoreException e) { continue; } if (configType.equals(programType)) { if (!launche.isTerminated()) { MessageDialog .openWarning( window.getShell(), ExternalToolsProgramMessages.ProgramLaunchDelegate_Workbench_Closing_1, ExternalToolsProgramMessages.ProgramLaunchDelegate_The_workbench_is_exiting); break; } } } }

Target:
public void windowClosed(IWorkbenchWindow window) { IWorkbenchWindow windows[] = PlatformUI.getWorkbench() .getWorkbenchWindows(); if (windows.length > 1) { return; } ILaunchManager manager = DebugPlugin.getDefault() .getLaunchManager(); ILaunchConfigurationType programType = manager .getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE); if (programType == null) { return; } ILaunch launches[] = manager.getLaunches(); ILaunchConfigurationType configType; ILaunchConfiguration config; for (ILaunch launch : launches) { try { config = launch.getLaunchConfiguration(); if (config == null) { continue; } configType = config.getType(); }catch (CoreException e) { continue; } if (configType.equals(programType)) { if (!launch.isTerminated()) { MessageDialog .openWarning( window.getShell(), ExternalToolsProgramMessages.ProgramLaunchDelegate_Workbench_Closing_1, ExternalToolsProgramMessages.ProgramLaunchDelegate_The_workbench_is_exiting); break; } } } }
Source:
public void unbindProducers(String outputChannelName) { String transport = this.channelBindingServiceProperties.getBinder(outputChannelName); Binder<MessageChannel> binder = binderFactory.getBinder(transport); binder.unbindProducers(outputChannelName); }

Target:
public void unbindProducers(String outputChannelName) { Binder<MessageChannel> binder = getBinderForChannel(outputChannelName); binder.unbindProducers(outputChannelName); }
Source:
public void testOneFlowInSplit() { try { new ClassPathXmlApplicationContext("/org/springframework/batch/core/jsr/configuration/xml/invalid-split-context.xml.invalid"); } catch (BeanDefinitionParsingException bdpe) { assertTrue(bdpe.getMessage().contains("A <split/> must contain at least two 'flow' elements.")); return; } fail("Expected exception was not thrown"); }

Target:
public void testOneFlowInSplit() { try { new ClassPathXmlApplicationContext("/org/springframework/batch/core/jsr/configuration/xml/invalid-split-context.xml"); } catch (BeanDefinitionParsingException bdpe) { assertTrue(bdpe.getMessage().contains("A <split/> must contain at least two 'flow' elements.")); return; } fail("Expected exception was not thrown"); }