auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static final InputRow fromBytes(byte[] data, AggregatorFactory[] aggs) { try { DataInput in = ByteStreams.newDataInput(data); long timestamp = in.readLong(); Map<String, Object> event = Maps.newHashMap(); List<String> dimensions = Lists.newArrayList(); int dimNum = WritableUtils.readVInt(in); for(int i = 0; i < dimNum; i++) { String dimension = readString(in); dimensions.add(dimension); List<String> dimensionValues = readStringArray(in); if(dimensionValues==null) { continue; } if(dimensionValues.size() == 1) { event.put(dimension, dimensionValues.get(0)); } else { event.put(dimension, dimensionValues); } } int metricSize = WritableUtils.readVInt(in); for(int i = 0; i < metricSize; i++) { String metric = readString(in); String type = readString(in); if(type.equals(FLOAT)) { event.put(metric, in.readFloat()); } else if(type.equals(LONG)) { event.put(metric, WritableUtils.readVLong(in)); } else { ComplexMetricSerde serde = getComplexMetricSerde(type); byte[] value = readBytes(in); event.put(metric, serde.fromBytes(value, 0, value.length)); } } return new MapBasedInputRow(timestamp, dimensions, event); } catch(IOException ex) { throw Throwables.propagate(ex); } }

Target:
public static final InputRow fromBytes(byte[] data, AggregatorFactory[] aggs) { try { DataInput in = ByteStreams.newDataInput(data); long timestamp = in.readLong(); Map<String, Object> event = Maps.newHashMap(); List<String> dimensions = Lists.newArrayList(); int dimNum = WritableUtils.readVInt(in); for (int i = 0; i < dimNum; i++) { String dimension = readString(in); dimensions.add(dimension); List<String> dimensionValues = readStringArray(in); if (dimensionValues == null) { continue; } if (dimensionValues.size() == 1) { event.put(dimension, dimensionValues.get(0)); } else { event.put(dimension, dimensionValues); } } int metricSize = WritableUtils.readVInt(in); for (int i = 0; i < metricSize; i++) { String metric = readString(in); String type = getType(metric, aggs, i); if (type.equals("float")) { event.put(metric, in.readFloat()); } else if (type.equals("long")) { event.put(metric, WritableUtils.readVLong(in)); } else { ComplexMetricSerde serde = getComplexMetricSerde(type); byte[] value = readBytes(in); event.put(metric, serde.fromBytes(value, 0, value.length)); } } return new MapBasedInputRow(timestamp, dimensions, event); } catch(IOException ex) { throw Throwables.propagate(ex); } }
Source:
private long getCowVirtualSize(String id) throws IOException { byte[] imgContent = new byte[72]; ImageDownload downloadImage = getGlanceClient().images().download(id).execute(); try { int bytesRead = downloadImage.getInputStream().read(imgContent, 0, imgContent.length); if (bytesRead != imgContent.length) { throw new RuntimeException("Unable to read image header: " + bytesRead); } } finally { downloadImage.getInputStream().close(); } ByteBuffer b = ByteBuffer.wrap(imgContent); if (b.getInt() == 0x514649fb && b.getInt() == 2) { b.position(24); return b.getLong(); } throw new RuntimeException("Unable to recognize QCOW2 format"); }

Target:
private long getCowVirtualSize(String id) throws IOException { byte[] imgContent = new byte[72]; ImageDownload downloadImage = getClient().images().download(id).execute(); try { int bytesRead = downloadImage.getInputStream().read(imgContent, 0, imgContent.length); if (bytesRead != imgContent.length) { throw new RuntimeException("Unable to read image header: " + bytesRead); } } finally { downloadImage.getInputStream().close(); } ByteBuffer b = ByteBuffer.wrap(imgContent); if (b.getInt() == 0x514649fb && b.getInt() == 2) { b.position(24); return b.getLong(); } throw new RuntimeException("Unable to recognize QCOW2 format"); }
Source:
private void setRetryBackoff(long backOffMs) { context.backoffMs(backOffMs); }

Target:
private void setRetryBackoff(long backOffMs) { context.timeout(backOffMs); }
Source:
public static OAuth2AuthorizationRequest.Builder request() { String registrationId = "registration-id"; String clientId = "client-id"; Map<String, Object> additionalParameters = new HashMap<>(); additionalParameters.put(OAuth2ParameterNames.REGISTRATION_ID, registrationId); return OAuth2AuthorizationRequest.authorizationCode() .authorizationUri("<LINK_0>") .clientId(clientId) .scope("openid") .redirectUri("<LINK_1>") .state("state") .additionalParameters(additionalParameters); }

Target:
public static OAuth2AuthorizationRequest.Builder request() { String registrationId = "registration-id"; String clientId = "client-id"; Map<String, Object> additionalParameters = new HashMap<>(); additionalParameters.put(OAuth2ParameterNames.REGISTRATION_ID, registrationId); return OAuth2AuthorizationRequest.authorizationCode() .authorizationUri("<LINK_0>") .clientId(clientId) .redirectUri("<LINK_1>") .state("state") .additionalParameters(additionalParameters); }
Source:
public static boolean reportNewVersion(String newVersion, String currentVersion) { if (newVersion == null || newVersion.equals("")) { return false; } if (newVersion.toLowerCase(Locale.US).endsWith("beta")) { return false; } return !newVersion.equals(currentVersion); }

Target:
public static boolean reportNewVersion(String newVersion, String currentVersion) { if (newVersion == null || newVersion.equals("")) { return false; } if (!newVersion.matches(REALM_VERSION_PATTERN)) { return false; } return !newVersion.equals(currentVersion); }
Source:
public static void main(String[] args) throws Exception { HeadlessEnvironment env = new HEnv(new Name("engine")); Context context = env.getContext(); ModuleManager moduleManager = context.get(ModuleManager.class); Future<Void> remoteModuleRegistryUpdater = Executors.newSingleThreadExecutor() .submit(moduleManager.getInstallManager().updateRemoteRegistry()); remoteModuleRegistryUpdater.get(); List<Module> sortedGameModules = getListOfGameModules(moduleManager); List<Module> sortedRemoteModules = getListofRemoteModules(moduleManager); String wiki = generateWiki(moduleManager, sortedGameModules, sortedRemoteModules); String fileName = "Module_Wiki.md"; BufferedWriter writer = new BufferedWriter(new FileWriter(new File(fileName))); writer.write(wiki); writer.flush(); writer.close(); System.out.println("Module Wiki generation file is ready!"); env.close(); }

Target:
public static void main(String[] args) throws Exception { HeadlessEnvironment env = new ModuleMetaDataProvidingHeadlessEnvironment(new Name("engine")); Context context = env.getContext(); ModuleManager moduleManager = context.get(ModuleManager.class); List<Module> sortedGameModules = getListOfGameModules(moduleManager); List<Module> sortedRemoteModules = getListofRemoteModules(moduleManager); String wiki = generateWiki(moduleManager, sortedGameModules, sortedRemoteModules); String fileName = "Module_Wiki.md"; BufferedWriter writer = new BufferedWriter(new FileWriter(new File(fileName))); writer.write(wiki); writer.flush(); writer.close(); System.out.println("Module Wiki generation file is ready!"); env.close(); }
Source:
public CannedAccessControlList getCannedACL() { return cannedACL; }

Target:
CannedAccessControlList getCannedACL() { return cannedACL; }
Source:
public static void register(AggregationImplModule mod) { for (var supportedType : DataTypes.PRIMITIVE_TYPES) { mod.register( Signature.aggregate( NAME, supportedType.getTypeSignature(), supportedType.getTypeSignature()), args -> { var arg = args.get(0); var info = new FunctionInfo( new FunctionIdent(NAME, args), arg, FunctionInfo.Type.AGGREGATE ); if (arg instanceof FixedWidthType) { return new FixedMaximumAggregation(info); } else { return new VariableMaximumAggregation(info); } } ); } }

Target:
public static void register(AggregationImplModule mod) { for (var supportedType : DataTypes.PRIMITIVE_TYPES) { var fixedWidthType = supportedType instanceof FixedWidthType; mod.register( Signature.aggregate( NAME, supportedType.getTypeSignature(), supportedType.getTypeSignature()), args -> { var arg = args.get(0); var info = new FunctionInfo( new FunctionIdent(NAME, args), arg, FunctionInfo.Type.AGGREGATE ); return fixedWidthType ? new FixedMaximumAggregation(info) : new VariableMaximumAggregation(info); } ); } }
Source:
protected void editTextAndVerify(Address address, String attributeName, int value) throws Exception { page.getConfigFragment().editTextAndSave(attributeName, String.valueOf(value)); administration.reloadIfRequired(); new ResourceVerifier(address, client).verifyAttribute(attributeName, value); }

Target:
protected void editTextAndVerify(Address address, String attributeName, int value) throws Exception { page.getConfigFragment().editTextAndSave(attributeName, String.valueOf(value)); new ResourceVerifier(address, client).verifyAttribute(attributeName, value); }
Source:
public static void addExtension(String name) { String br = Configuration.getBrowser(); try { if ("FF".equalsIgnoreCase(br)) { NewDriverProvider.getFirefoxProfile().addExtension(findExtension(name, "xpi")); } else if (br.contains("CHROME")) { NewDriverProvider.getChromeOptions().addExtensions(findExtension(name, "crx")); } else { throw new WebDriverException( String.format("'%s' browser doesn't support adding of extensions", br)); } } catch (IOException e) { PageObjectLogging.log("Error occurred during adding '" + name + "' extension", e, false); } }

Target:
public static void addExtension(String name) { String browser = Configuration.getBrowser(); try { if ("FF".equalsIgnoreCase(browser)) { NewDriverProvider.getFirefoxProfile().addExtension(findExtension(name, "xpi")); } else if (browser.contains("CHROME")) { NewDriverProvider.getChromeOptions().addExtensions(findExtension(name, "crx")); } else { throw new WebDriverException( String.format("'%s' browser doesn't support adding of extensions", browser)); } } catch (IOException e) { PageObjectLogging.log("Error occurred during adding '" + name + "' extension", e, false); } }
Source:
public String getQuestionResultStatisticsCsv( List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, FeedbackSessionResultsBundle bundle) { if (responses.isEmpty()) { return ""; } StringBuilder fragments = new StringBuilder(); Map<String, List<Integer>> recipientRanks = generateOptionRanksMapping(responses); Map<String, List<Integer>> recipientRanksExcludingSelf = getRecipientRanksExcludingSelf(responses); DecimalFormat df = new DecimalFormat("#.##"); Map<String, Integer> recipientSelfRanks = generateSelfRankForEachRecipient(responses); for (Entry<String, List<Integer>> entry : recipientRanks.entrySet()) { String teamName = bundle.getTeamNameForEmail(entry.getKey()); String recipientName = bundle.getNameForEmail(entry.getKey()); String option = SanitizationHelper.sanitizeForCsv(teamName) + "," + SanitizationHelper.sanitizeForCsv(recipientName); String userAverageExcludingSelfText = getAverageExcludingSelfText(df, recipientRanksExcludingSelf, entry.getKey()); List<Integer> ranks = entry.getValue(); double average = computeAverage(ranks); String selfRank = recipientSelfRanks.containsKey(entry.getKey()) ? Integer.toString(recipientSelfRanks.get(entry.getKey())) : "-"; fragments.append(option); fragments.append(',').append(selfRank); fragments.append(',').append(df.format(average)); fragments.append(',').append(userAverageExcludingSelfText); fragments.append(Const.EOL); } return "Team, Recipient, Self Rank, Average Rank, Average Rank Excluding Self" + Const.EOL + fragments + Const.EOL; }

Target:
public String getQuestionResultStatisticsCsv( List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, FeedbackSessionResultsBundle bundle) { if (responses.isEmpty()) { return ""; } StringBuilder fragments = new StringBuilder(); Map<String, List<Integer>> recipientRanks = generateOptionRanksMapping(responses); Map<String, List<Integer>> recipientRanksExcludingSelf = getRecipientRanksExcludingSelf(responses); Map<String, Integer> recipientSelfRanks = generateSelfRankForEachRecipient(responses); DecimalFormat df = new DecimalFormat("#.##"); for (Entry<String, List<Integer>> entry : recipientRanks.entrySet()) { String teamName = bundle.getTeamNameForEmail(entry.getKey()); String recipientName = bundle.getNameForEmail(entry.getKey()); String option = SanitizationHelper.sanitizeForCsv(teamName) + "," + SanitizationHelper.sanitizeForCsv(recipientName); String userAverageExcludingSelfText = getAverageExcludingSelfText(df, recipientRanksExcludingSelf, entry.getKey()); List<Integer> ranks = entry.getValue(); double average = computeAverage(ranks); String selfRank = recipientSelfRanks.containsKey(entry.getKey()) ? Integer.toString(recipientSelfRanks.get(entry.getKey())) : "-"; fragments.append(option); fragments.append(',').append(selfRank); fragments.append(',').append(df.format(average)); fragments.append(',').append(userAverageExcludingSelfText); fragments.append(','); fragments.append(StringHelper.join(",", ranks)); fragments.append(Const.EOL); } return "Team, Recipient, Self Rank, Average Rank, Average Rank Excluding Self, Ranks Received" + Const.EOL + fragments + Const.EOL; }
Source:
public Headers getHeadersFromGET(String url) { MockMvcRequestSpecification o = givenLocal().contentType(MediaType.TEXT_PLAIN_VALUE); logger.debug("[getArtifact] URL " + url); MockMvcResponse response = o.when().get(url); Headers allHeaders = response.getHeaders(); logger.debug("HTTP GET " + url); logger.debug("Response headers:"); allHeaders.forEach(header -> logger.debug("\t" + header.getName() + " = " + header.getValue())); if (response.getStatusCode() == OK || response.getStatusCode() == PARTIAL_CONTENT) { logger.debug("Received headers successfully."); return allHeaders; } else { logger.warn("[getArtifactAsByteArray] response " + response.getStatusCode()); return null; } }

Target:
public Headers getHeadersFromGET(String url) { MockMvcRequestSpecification o = givenLocal().contentType(MediaType.TEXT_PLAIN_VALUE); <<<<<<< 1d9871871bd012858efed0af3d97ca24f450461e ======= >>>>>>> Fixed PR MockMvcResponse response = o.when().get(url); Headers allHeaders = response.getHeaders(); logger.debug("HTTP GET " + url); logger.debug("Response headers:"); allHeaders.forEach(header -> logger.debug("\t" + header.getName() + " = " + header.getValue())); if (response.getStatusCode() == OK || response.getStatusCode() == PARTIAL_CONTENT) { logger.debug("Received headers successfully."); return allHeaders; } else { logger.warn("[getArtifactAsByteArray] response " + response.getStatusCode()); return null; } }
Source:
private Optional<String> parseUsingGrobid(String plainText) { try { return Optional.of(grobidService.processCitation(plainText, GrobidService.ConsolidateCitations.WITH_METADATA)); } catch (IOException e) { throw new UncheckedIOException("Could not process citation. " + e.getMessage(), e); } }

Target:
private Optional<String> parseUsingGrobid(String plainText) { try { return Optional.of(grobidService.processCitation(plainText, GrobidService.ConsolidateCitations.WITH_METADATA)); } catch (SocketTimeoutException e) { String msg = "Connection timed out."; LOGGER.debug(msg, e); throw new RuntimeException(msg, e); } catch (IOException e) { String msg = "Could not process citation. " + e.getMessage(); LOGGER.debug(msg, e); throw new RuntimeException(msg, e); } }
Source:
public NotificationService(NotificationProperties prop) throws NotificationServiceException { this.prop = prop; this.eventsManager = new EventsManager(); this.firstMatchSimpleFilter = new FirstMatchSimpleFilter(); Smtp smtp = new Smtp(prop); smtp.addObserver(this.eventsManager); addTransport(smtp); this.firstMatchSimpleFilter.registerTransport(smtp); configurationFilters = FirstMatchSimpleFilter.parse(prop.getProperty(NotificationProperties.FILTER)); markOldEventsAsProcessed(); }

Target:
public NotificationService(NotificationProperties prop) throws NotificationServiceException { this.prop = prop; this.eventsManager = new EventsManager(); this.firstMatchSimpleFilter = new FirstMatchSimpleFilter(); configurationFilters = FirstMatchSimpleFilter.parse(prop.getProperty(NotificationProperties.FILTER)); markOldEventsAsProcessed(); }
Source:
protected byte[][] randomData(String prefix, int count) { byte[][] result = new byte[count][]; for (int i = 0; i < count; ++i) { result[i] = Bytes.toBytes(prefix + RandomStringUtils.randomAlphanumeric(8)); } return result; }

Target:
public byte[][] randomData(String prefix, int count) { byte[][] result = new byte[count][]; for (int i = 0; i < count; ++i) { result[i] = Bytes.toBytes(prefix + RandomStringUtils.randomAlphanumeric(8)); } return result; }
Source:
public void updateDynamicSetting( String setting, String update ) throws IllegalArgumentException, InvalidSettingException { verifyValidDynamicSetting( setting ); synchronized ( params ) { boolean oldDefault = false; boolean newDefault = false; String oldValue; String newValue; if ( update == null || update.isEmpty() ) { String overriddenDefault = overriddenDefaults.get( setting ); boolean hasDefault = overriddenDefault != null; oldValue = hasDefault ? params.put( setting, overriddenDefault ) : params.remove( setting ); newValue = getDefaultValueOf( setting ); newDefault = true; } else { Map<String,String> newEntry = stringMap( setting, update ); List<SettingValidator> settingValidators = configOptions.stream() .map( ConfigOptions::settingGroup ) .collect( Collectors.toList() ); for ( SettingValidator validator : settingValidators ) { validator.validate( newEntry, ignore -> ); } oldValue = getDefaultValueOf( setting ); if ( params.put( setting, update ) == null ) { oldDefault = true; } newValue = update; } log.info( "Setting changed: '%s' changed from '%s' to '%s'", setting, oldDefault ? "default (" + oldValue + ")" : oldValue, newDefault ? "default (" + newValue + ")" : newValue ); updateListeners.getOrDefault( setting, emptyList() ).forEach( l -> l.accept( oldValue, newValue ) ); } }

Target:
public void updateDynamicSetting( String setting, String update ) throws IllegalArgumentException, InvalidSettingException { verifyValidDynamicSetting( setting ); synchronized ( params ) { boolean oldValueIsDefault = false; boolean newValueIsDefault = false; String oldValue; String newValue; if ( update == null || update.isEmpty() ) { String overriddenDefault = overriddenDefaults.get( setting ); boolean hasDefault = overriddenDefault != null; oldValue = hasDefault ? params.put( setting, overriddenDefault ) : params.remove( setting ); newValue = getDefaultValueOf( setting ); newValueIsDefault = true; } else { Map<String,String> newEntry = stringMap( setting, update ); List<SettingValidator> settingValidators = configOptions.stream() .map( ConfigOptions::settingGroup ) .collect( Collectors.toList() ); for ( SettingValidator validator : settingValidators ) { validator.validate( newEntry, ignore -> ); } String previousValue = params.put( setting, update ); if ( previousValue != null ) { oldValue = previousValue; } else { oldValue = getDefaultValueOf( setting ); oldValueIsDefault = true; } newValue = update; } log.info( "Setting changed: '%s' changed from '%s' to '%s'", setting, oldValueIsDefault ? "default (" + oldValue + ")" : oldValue, newValueIsDefault ? "default (" + newValue + ")" : newValue ); updateListeners.getOrDefault( setting, emptyList() ).forEach( l -> l.accept( oldValue, newValue ) ); } }
Source:
public void flatMapTest(){ String result = TransactionFlow.of(transactionTemplate, this::load) .flatMap(this::newTransaction) .execute(10) .orElse(""); }

Target:
public void flatMapTest(){ String result = TransactionFlow.of(transactionTemplate, this::load) .flatMap(this::newTransaction) .execute(10) .orElse(""); assertThat(result,equalTo("data:10")); }
Source:
public void actionShare(HomeActivity activity, ArrayList<IndexedItem> with, IOnResult<Boolean> listener) { if (with.size() == 1 && with.get(0) instanceof IndexedFile) { IndexedFile file = (IndexedFile) with.get(0); Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_SUBJECT, activity.getString(R.string.share_file)); MimeTypeMap map = MimeTypeMap.getSingleton(); String mimeType = map.getMimeTypeFromExtension(file.getExtension().substring(1)); intent.setType(mimeType); Uri uri = Uri.fromFile(file.getUnlockedFile()); intent.putExtra(Intent.EXTRA_STREAM, uri); activity.setRequestedActivity(true); try { activity.startActivity(intent); } catch (ActivityNotFoundException e) { Utils.toast(R.string.share_not_found); } } else { Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND_MULTIPLE); intent.putExtra(Intent.EXTRA_SUBJECT, activity.getString(R.string.share_files)); ArrayList<Uri> files = new ArrayList<Uri>(); ArrayList<String> mimes = new ArrayList<String>(); MimeTypeMap myMime = MimeTypeMap.getSingleton(); for (IndexedItem item : with) { if (item instanceof IndexedFile) { IndexedFile file = (IndexedFile) item; Uri uri = Uri.fromFile(file.getUnlockedFile()); String mimeType = myMime.getMimeTypeFromExtension(file.getExtension().substring(1)); if (!mimes.contains(mimeType)) { mimes.add(mimeType); } files.add(uri); } } StringBuilder sb = new StringBuilder(); for (String mime : mimes) { sb.append(mime); sb.append(','); } sb.deleteCharAt(sb.length() - 1); String mimeType = sb.toString(); Utils.d("Mimetype: " + mimeType); intent.setType(mimeType); intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, files); try { activity.startActivity(intent); } catch (ActivityNotFoundException e) { Utils.toast(R.string.multi_share_not_found); } } if (listener != null) { listener.onResult(true); } }

Target:
public void actionShare(HomeActivity activity, ArrayList<IndexedItem> with, IOnResult<Boolean> listener) { Intent shareIntent; if (with.size() == 1 && with.get(0) instanceof IndexedFile) { shareIntent = getShareIntentSingle((IndexedFile) with.get(0)); } else { shareIntent = getShareIntentMultiple(with); } activity.setRequestedActivity(true); boolean activityFound = true; try { activity.startActivity(shareIntent); } catch (ActivityNotFoundException e) { Utils.toast(R.string.share_not_found); activityFound = false; } if (listener != null) { listener.onResult(activityFound); } }
Source:
protected List<Section> getScrolledCompositeSections() { List<Section> sections = new ArrayList<Section>(); if (scrolledComposite.getChildren().length != 0 && scrolledComposite.getChildren()[0] instanceof Composite) { Composite sectionContainer = (Composite) scrolledComposite.getChildren()[0]; sections = Lists.newArrayList(Iterables.filter(Arrays.asList(sectionContainer.getChildren()), Section.class)); } return sections; }

Target:
protected List<Section> getScrolledCompositeSections() { List<Section> sections = new ArrayList<Section>(); if (scrolledComposite.getChildren().length != 0 && scrolledComposite.getChildren()[0] instanceof Composite) { Composite sectionContainer = (Composite) scrolledComposite.getChildren()[0]; sections = FluentIterable.from(Arrays.asList(sectionContainer.getChildren())) .filter(Section.class) .toList(); } return sections; }
Source:
private void setAutoPanMode(AutoPanMode current, AutoPanMode update) { if (mPanMode.compareAndSet(current, update)) { switch (current) { case DRONE: LocalBroadcastManager.getInstance(getActivity().getApplicationContext()) .unregisterReceiver(eventReceiver); break; case DISABLED: default: break; } switch (update) { case DRONE: LocalBroadcastManager.getInstance(getActivity().getApplicationContext()).registerReceiver (eventReceiver, mEventFilter); break; case DISABLED: default: break; } } }

Target:
private void setAutoPanMode(AutoPanMode current, AutoPanMode update) { mPanMode.compareAndSet(current, update); }
Source:
public void process(final Exchange exchange) throws Exception { final Message in = exchange.getIn(); String fcrepoBinaryUri = (String) in.getHeader(FCREPO_URI); if (fcrepoBinaryUri == null) { Document msgBody = MessageUtil.getDocumentBody(in); Element body = msgBody.getRootElement(); String pidValue = body.getChild("pid", ATOM_NS).getTextTrim(); String mimeType = body.getChild("mimeType", ATOM_NS).getTextTrim(); log.info("Adding enhancement headers for " + pidValue); in.setHeader(FCREPO_URI, pidValue); in.setHeader(CdrBinaryMimeType, mimeType); in.setHeader("org.fcrepo.jms.resourceType", Binary.getURI()); } }

Target:
public void process(final Exchange exchange) throws Exception { final Message in = exchange.getIn(); String fcrepoBinaryUri = (String) in.getHeader(FCREPO_URI); if (fcrepoBinaryUri == null) { Document msgBody = MessageUtil.getDocumentBody(in); Element body = msgBody.getRootElement(); String pidValue = body.getChild("pid", ATOM_NS).getTextTrim(); String mimeType = body.getChild("mimeType", ATOM_NS).getTextTrim(); log.info("Adding enhancement headers for " + pidValue); in.setHeader(FCREPO_URI, pidValue); in.setHeader(CdrBinaryMimeType, mimeType); in.setHeader(FCREPO_RESOURCE_TYPE, Binary.getURI()); } }
Source:
public void removeAll(final Set<? extends K> keys) throws BulkCacheWritingException { removeAllObserver.begin(); statusTransitioner.checkAvailable(); checkNonNull(keys); if(keys.isEmpty()) { removeAllObserver.end(RemoveAllOutcome.SUCCESS); return; } for (K key: keys) { if (key == null) { throw new NullPointerException(); } } RemoveAllFunction<K, V> removeAllFunction = new RemoveAllFunction<K, V>(); try { store.bulkCompute(keys, removeAllFunction); addBulkMethodEntriesCount(BulkOps.REMOVE_ALL, removeAllFunction.getActualRemoveCount().get()); removeAllObserver.end(RemoveAllOutcome.SUCCESS); } catch (StoreAccessException e) { try { resilienceStrategy.removeAllFailure(keys, e); } finally { removeAllObserver.end(RemoveAllOutcome.FAILURE); } } }

Target:
public void removeAll(final Set<? extends K> keys) throws BulkCacheWritingException { removeAllObserver.begin(); statusTransitioner.checkAvailable(); checkNonNull(keys); if(keys.isEmpty()) { removeAllObserver.end(RemoveAllOutcome.SUCCESS); return; } for (K key: keys) { if (key == null) { throw new NullPointerException(); } } try { RemoveAllFunction<K, V> removeAllFunction = new RemoveAllFunction<K, V>(); store.bulkCompute(keys, removeAllFunction); addBulkMethodEntriesCount(BulkOps.REMOVE_ALL, removeAllFunction.getActualRemoveCount().get()); removeAllObserver.end(RemoveAllOutcome.SUCCESS); } catch (StoreAccessException e) { try { resilienceStrategy.removeAllFailure(keys, e); } finally { removeAllObserver.end(RemoveAllOutcome.FAILURE); } } }
Source:
protected Collection<Negotiation> getNegotiationsLinkedToSubAward(Map<String, String> negotiationValues, Map<String, String> associatedValues) { Map<String, String> values = transformMap(associatedValues, subAwardTransform); if (values != null && values.containsKey("title")) values.remove("title"); if (values == null) { return new ArrayList<Negotiation>(); } Criteria criteria = getCollectionCriteriaFromMap(new SubAward(), values); Criteria negotiationCrit = new Criteria(); ReportQueryByCriteria subQuery = QueryFactory.newReportQuery(SubAward.class, criteria); subQuery.setAttributes(new String[] {"subAwardId"}); negotiationCrit.addIn(ASSOCIATED_DOC_ID_ATTR, subQuery); negotiationCrit.addEqualTo(NEGOTIATION_TYPE_ATTR, getNegotiationService().getNegotiationAssociationType(NegotiationAssociationType.SUB_AWARD_ASSOCIATION).getId()); Collection<Negotiation> result = this.findCollectionBySearchHelper(Negotiation.class, negotiationValues, false, false, negotiationCrit); return result; }

Target:
protected Collection<Negotiation> getNegotiationsLinkedToSubAward(Map<String, String> negotiationValues, Map<String, String> associatedValues) { Map<String, String> values = transformMap(associatedValues, subAwardTransform); if (values != null && values.containsKey("title")) values.remove("title"); if (values == null) { return new ArrayList<Negotiation>(); } Criteria criteria = getCollectionCriteriaFromMap(new SubAward(), values); Criteria negotiationCrit = new Criteria(); ReportQueryByCriteria subQuery = QueryFactory.newReportQuery(SubAward.class, criteria); subQuery.setAttributes(new String[] {"subAwardId"}); negotiationCrit.addIn(ASSOCIATED_DOC_ID_ATTR, subQuery); negotiationCrit.addEqualTo(NEGOTIATION_TYPE_ATTR, getNegotiationService().getNegotiationAssociationType(NegotiationAssociationType.SUB_AWARD_ASSOCIATION).getId()); Collection<Negotiation> result = this.findCollectionBySearchHelper(Negotiation.class, negotiationValues, false, false, negotiationCrit); if (result != null && !result.isEmpty()) result = filterNegotitations(result,associatedValues.get("title"),associatedValues.get("leadUnitNumber"),associatedValues.get("leadUnitName"),associatedValues.get("subAwardRequisitionerId")); return result; }
Source:
public List<Plugin> getUpdates() { Map<String,Plugin> pluginMap = new LinkedHashMap<>(); Map<String, List<Plugin>> incompatiblePluginMap = new LinkedHashMap<>(); for (UpdateSite site : sites) { for (Plugin plugin: site.getUpdates()) { final Plugin existing = pluginMap.get(plugin.name); if (existing == null) { pluginMap.put(plugin.name, plugin); if (!plugin.isNeededDependenciesCompatibleWithInstalledVersion()) { for (Plugin incompatiblePlugin : plugin.getDependenciesIncompatibleWithInstalledVersion()) { if (!incompatiblePluginMap.containsKey(incompatiblePlugin.name)) { List<Plugin> l = new ArrayList<>(); l.add(plugin); incompatiblePluginMap.put(incompatiblePlugin.name, l); } else { incompatiblePluginMap.get(incompatiblePlugin.name).add(plugin); } } } } else if (!existing.version.equals(plugin.version)) { final String altKey = plugin.name + ":" + plugin.version; if (!pluginMap.containsKey(altKey)) { pluginMap.put(altKey, plugin); } } } } for(String incompatiblePlugin : incompatiblePluginMap.keySet()) { if(pluginMap.containsKey(incompatiblePlugin)) { pluginMap.get(incompatiblePlugin).setIncompatibleParentPlugins(incompatiblePluginMap.get(incompatiblePlugin)); } } return new ArrayList<>(pluginMap.values()); }

Target:
public List<Plugin> getUpdates() { Map<String,Plugin> pluginMap = new LinkedHashMap<>(); final Map<String, Set<Plugin>> incompatiblePluginMap = new LinkedHashMap<>(); final PluginManager.MetadataCache cache = new PluginManager.MetadataCache(); for (UpdateSite site : sites) { for (Plugin plugin: site.getUpdates()) { final Plugin existing = pluginMap.get(plugin.name); if (existing == null) { pluginMap.put(plugin.name, plugin); if (!plugin.isNeededDependenciesCompatibleWithInstalledVersion()) { for (Plugin incompatiblePlugin : plugin.getDependenciesIncompatibleWithInstalledVersion(cache)) { incompatiblePluginMap.computeIfAbsent(incompatiblePlugin.name, _ignored -> new HashSet<>()).add(plugin); } } } else if (!existing.version.equals(plugin.version)) { final String altKey = plugin.name + ":" + plugin.version; if (!pluginMap.containsKey(altKey)) { pluginMap.put(altKey, plugin); } } } } incompatiblePluginMap.forEach((key, incompatiblePlugins) -> pluginMap.computeIfPresent(key, (_ignored, plugin) -> { plugin.setIncompatibleParentPlugins(incompatiblePlugins); return plugin; })); return new ArrayList<>(pluginMap.values()); }
Source:
public void resumeMigrations() { logger.info("Resuming ongoing migrations ..."); TypedQuery<Migration> query = em.createNamedQuery("Migration.findByStatus", Migration.class); query.setParameter("statuses", PENDING_STATUSES); query.getResultList().stream().forEach(m -> { try { migrationService.migrate(m); } catch (InvalidMigrationException e) { logger.warn("Unable to resume migration with id: " + m.getId(), e); } }); }

Target:
public void resumeMigrations() { logger.info("Resuming ongoing migrations ..."); TypedQuery<Migration> query = em.createNamedQuery("Migration.findByStatus", Migration.class); query.setParameter("statuses", PENDING_STATUSES); query.getResultList().forEach(m -> { try { migrationService.migrate(m); } catch (InvalidMigrationException e) { logger.warn("Unable to resume migration with id: " + m.getId(), e); } }); }
Source:
public static void close(Closeable c) { try { if(c != null) { c.close(); } } catch (Exception e) { } }

Target:
public static void close(Closeable c) { IOUtils.closeQuietly(c); }
Source:
private void tick(final Tick message) { _periodicMetrics.recordCounter("job_executor_actor_ticks", 1); if (!_cachedJob.isPresent()) { killSelf(); throw new IllegalStateException("somehow, uninitialized JobExecutorActor is trying to tick"); } final CachedJob<T> cachedJob = _cachedJob.get(); final Optional<Instant> nextRun = cachedJob.getSchedule().nextRun(cachedJob.getLastRun()); if (!nextRun.isPresent()) { LOGGER.info() .setMessage("job has no more scheduled runs") .addData("cachedJob", cachedJob) .log(); killSelf(); return; } if (_clock.instant().isBefore(nextRun.get().minus(EXECUTION_SLOP))) { scheduleTickFor(nextRun.get()); } else { attemptExecuteAndUpdateRepository(nextRun.get()); } }

Target:
private void tick(final Tick message) throws ActorNotInitializedException { _periodicMetrics.recordCounter("job_executor_actor_ticks", 1); if (!_cachedJob.isPresent()) { throw new ActorNotInitializedException("somehow, uninitialized JobExecutorActor is trying to tick"); } final CachedJob<T> cachedJob = _cachedJob.get(); final Optional<Instant> nextRun = cachedJob.getSchedule().nextRun(cachedJob.getLastRun()); if (!nextRun.isPresent()) { LOGGER.info() .setMessage("job has no more scheduled runs") .addData("cachedJob", cachedJob) .log(); killSelf(); return; } if (_clock.instant().isBefore(nextRun.get().minus(EXECUTION_SLOP))) { scheduleTickFor(nextRun.get()); } else { try { attemptExecuteAndUpdateRepository(nextRun.get()); } catch (final NoSuchJobException error) { LOGGER.warn() .setMessage("attempted to start executing job, but job no longer exists in repository") .addData("ref", cachedJob.getRef()) .addData("scheduled", nextRun.get()) .log(); killSelf(); } } }
Source:
public Map<String, List<EvaluatorParameters>> getWorkerMetrics() { synchronized (workerEvalParams) { final Map<String, List<EvaluatorParameters>> currWorkerMetrics = new HashMap<>(workerEvalParams); return currWorkerMetrics; } }

Target:
public Map<String, List<EvaluatorParameters>> getWorkerMetrics() { synchronized (workerEvalParams) { final Map<String, List<EvaluatorParameters>> currWorkerMetrics = new HashMap<>(); for (final Map.Entry<String, List<EvaluatorParameters>> entry : workerEvalParams.entrySet()) { currWorkerMetrics.put(entry.getKey(), new ArrayList<>(entry.getValue())); } return currWorkerMetrics; } }
Source:
protected void handleCreateTarget() { final Map<String, String> commands = uiManager.getAddTargetCommands(); final Map<String, Image> images = uiManager.getTargetIcons(); if (!commands.isEmpty()) { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); ListDialog ld = new ListDialog(shell); ld.setTitle("New Target"); ld.setMessage("Select target type to create"); ld.setContentProvider(new ArrayContentProvider()); ld.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { return (String)element; } @Override public Image getImage(Object element) { return images.get(element); } }); ld.setInput(commands.keySet().toArray()); switch(ld.open()) { case Window.CANCEL: return; case Window.OK: String command = commands.get((String) (ld.getResult()[0])); Activator.runCommand(command); return; default: } } }

Target:
protected void handleCreateTarget() { final Map<String, String> commands = uiManager.getAddTargetCommands(); final Map<String, Image> images = uiManager.getTargetIcons(); if (!commands.isEmpty()) { ListDialog ld = new ListDialog(getShell()); ld.setTitle("New Launch Target"); ld.setMessage("Select target type to create"); ld.setContentProvider(new ArrayContentProvider()); ld.setLabelProvider(new LabelProvider() { @Override public String getText(Object element) { return (String)element; } @Override public Image getImage(Object element) { return images.get(element); } }); ld.setInput(commands.keySet().toArray()); switch(ld.open()) { case Window.CANCEL: return; case Window.OK: String command = commands.get((String) (ld.getResult()[0])); Activator.runCommand(command); return; default: } } }
Source:
public static IFile getVersionFile(IProject project) { return ResourceManager .getOneFolder(project, EResourceConstant.LIBRARIES) .getFile(PluginConstant.VERSION_FILE_PATH); }

Target:
public static IFile getVersionFile(IProject project) { if (project == null) { project = ResourceManager.getRootProject(); } return ResourceManager .getOneFolder(project, EResourceConstant.LIBRARIES) .getFile(PluginConstant.VERSION_FILE_PATH); }
Source:
private List<ChannelWithBlockCount> startSpilling(Queue<CircularElement<E>> cache) throws IOException, InterruptedException { final FileIOChannel.Enumerator enumerator = this.ioManager.createChannelEnumerator(); List<ChannelWithBlockCount> channelIDs = new ArrayList<>(); CircularElement<E> element; openSpillingBehaviour(); while (isRunning()) { element = cache.isEmpty() ? this.dispatcher.take(SortStage.SPILL) : cache.poll(); if (!isRunning()) { return Collections.emptyList(); } if (element == EOF_MARKER) { break; } FileIOChannel.ID channel = enumerator.next(); spillChannelManager.registerChannelToBeRemovedAtShutdown(channel); final BlockChannelWriter<MemorySegment> writer = this.ioManager.createBlockChannelWriter(channel); spillChannelManager.registerOpenChannelToBeRemovedAtShutdown(writer); final ChannelWriterOutputView output = new ChannelWriterOutputView(writer, this.writeMemory, this.memManager.getPageSize()); LOG.debug("Spilling buffer " + element.getId() + "."); spillingBehaviour.spillBuffer(element, output, largeRecordHandler); LOG.debug("Spilled buffer " + element.getId() + "."); output.close(); spillChannelManager.unregisterOpenChannelToBeRemovedAtShutdown(writer); if (output.getBytesWritten() > 0) { channelIDs.add(new ChannelWithBlockCount(channel, output.getBlockCount())); } element.getBuffer().reset(); this.dispatcher.send(SortStage.READ, element); } LOG.debug("Spilling done."); LOG.debug("Releasing sort-buffer memory."); disposeSortBuffers(false); return channelIDs; }

Target:
private List<ChannelWithBlockCount> startSpilling(Queue<CircularElement<E>> cache) throws IOException, InterruptedException { final FileIOChannel.Enumerator enumerator = this.ioManager.createChannelEnumerator(); List<ChannelWithBlockCount> channelIDs = new ArrayList<>(); openSpillingBehaviour(); while (isRunning()) { final CircularElement<E> element = cache.isEmpty() ? this.dispatcher.take(SortStage.SPILL) : cache.poll(); if (!isRunning()) { return Collections.emptyList(); } if (element == EOF_MARKER) { break; } FileIOChannel.ID channel = enumerator.next(); spillChannelManager.registerChannelToBeRemovedAtShutdown(channel); final BlockChannelWriter<MemorySegment> writer = this.ioManager.createBlockChannelWriter(channel); spillChannelManager.registerOpenChannelToBeRemovedAtShutdown(writer); final ChannelWriterOutputView output = new ChannelWriterOutputView(writer, this.writeMemory, this.memManager.getPageSize()); LOG.debug("Spilling buffer " + element.getId() + "."); spillingBehaviour.spillBuffer(element, output, largeRecordHandler); LOG.debug("Spilled buffer " + element.getId() + "."); output.close(); spillChannelManager.unregisterOpenChannelToBeRemovedAtShutdown(writer); if (output.getBytesWritten() > 0) { channelIDs.add(new ChannelWithBlockCount(channel, output.getBlockCount())); } element.getBuffer().reset(); this.dispatcher.send(SortStage.READ, element); } LOG.debug("Spilling done."); LOG.debug("Releasing sort-buffer memory."); disposeSortBuffers(false); return channelIDs; }
Source:
public void visitNode(Tree tree) { statements = CheckUtils.getStatements(tree); for (int i = 0; i < statements.size() - 1; i++) { StatementTree currentStatement = statements.get(i); if (currentStatement.is(Kind.IF_STATEMENT)) { checkStatement(getLastStatement((IfStatementTree)currentStatement), i, MESSAGE_IF); } else if (currentStatement.is(Kind.FOR_STATEMENT)) { checkStatement(((ForStatementTree) currentStatement).statements().get(0), i, MESSAGE_LOOP); } else if (currentStatement.is(Kind.FOREACH_STATEMENT)) { checkStatement(((ForEachStatementTree) currentStatement).statements().get(0), i, MESSAGE_LOOP); } else if (currentStatement.is(Kind.WHILE_STATEMENT)) { checkStatement(((WhileStatementTree) currentStatement).statements().get(0), i, MESSAGE_LOOP); } } }

Target:
public void visitNode(Tree tree) { List<StatementTree> statements = CheckUtils.getStatements(tree); for (int i = 0; i < statements.size() - 1; i++) { StatementTree currentStatement = statements.get(i); if (currentStatement.is(Kind.IF_STATEMENT)) { checkStatement(getLastStatement((IfStatementTree)currentStatement), i, statements); } else if (currentStatement.is(Kind.FOR_STATEMENT)) { checkStatement(((ForStatementTree) currentStatement).statements().get(0), i, statements); } else if (currentStatement.is(Kind.FOREACH_STATEMENT)) { checkStatement(((ForEachStatementTree) currentStatement).statements().get(0), i, statements); } else if (currentStatement.is(Kind.WHILE_STATEMENT)) { checkStatement(((WhileStatementTree) currentStatement).statements().get(0), i, statements); } } }
Source:
public boolean isVmStatusQuotaCountable(VMStatus status) { if (nonCountableQutoaVmStatusesMap.size() == 0) { synchronized (nonCountableQutoaVmStatusesMap) { List<Integer> list = DbFacade.getInstance().getQuotaDao().getNonCountableQutoaVmStatuses(); for (int i = 0; i < list.size(); i++) { nonCountableQutoaVmStatusesMap.put(list.get(i), null); } } } return nonCountableQutoaVmStatusesMap.get(status.getValue()) == null; }

Target:
public boolean isVmStatusQuotaCountable(VMStatus status) { if (nonCountableQutoaVmStatusesList.size() == 0) { synchronized (nonCountableQutoaVmStatusesList) { nonCountableQutoaVmStatusesList.addAll(DbFacade.getInstance() .getQuotaDao() .getNonCountableQutoaVmStatuses()); } } return !nonCountableQutoaVmStatusesList.contains(status.getValue()); }
Source:
public void isValidTransition_indicatesValidAndInvalidTransition() throws Exception { assertThat(PaymentGatewayStateTransitions.isValidTransition(CAPTURE_READY, CAPTURE_SUBMITTED), is(true)); assertThat(PaymentGatewayStateTransitions.isValidTransition(CREATED, AUTHORISATION_READY), is(false)); }

Target:
public void isValidTransition_indicatesValidAndInvalidTransition() { assertThat(isValidTransition(CAPTURE_READY, CAPTURE_SUBMITTED), is(true)); assertThat(isValidTransition(CREATED, AUTHORISATION_READY), is(false)); }
Source:
private void copyContact(Person src, Person dst) { dst.setActive(src.isActive()); dst.setFavorite(src.isFavorite()); dst.setIgnored(src.isIgnored()); dst.setLastPrayed(src.getLastPrayed()); dst.setPrayed(src.isPrayed()); dst.setSource(src.getSource()); RealmList<Note> notes = src.getNotes(); for (Note n : notes) { RealmList<Person> peopleTagged = n.getPeopleTagged(); Iterator<Person> i = peopleTagged.iterator(); while (i.hasNext()) { Person p = i.next(); if (p.getId().equals(src.getId())) { i.remove(); } } peopleTagged.add(dst); n.setPeopleTagged(peopleTagged); } dst.setNotes(src.getNotes()); }

Target:
private void copyContact(Person src, Person dst) { dst.setActive(src.isActive()); dst.setFavorite(src.isFavorite()); dst.setIgnored(src.isIgnored()); dst.setLastPrayed(src.getLastPrayed()); dst.setPrayed(src.isPrayed()); dst.setSource(src.getSource()); transferNotes(src, dst); }
Source:
public void process(Node externs, Node root) { FindImportsAndExports finder = new FindImportsAndExports(); NodeTraversal.traverseEs6(compiler, root, finder); Builder<Node> exports = ImmutableList.builder(); if (finder.isCommonJsModule()) { finder.reportModuleErrors(); finder.replaceUmdPatterns(); for (Node export : finder.getModuleExports()) { if (NodeUtil.getEnclosingScript(export) != null) { exports.add(export); } } for (Node export : finder.getExports()) { if (NodeUtil.getEnclosingScript(export) != null) { exports.add(export); } } finder.addGoogProvide(); compiler.reportCodeChange(); } NodeTraversal.traverseEs6(compiler, root, new RewriteModule(finder.isCommonJsModule(), exports.build())); }

Target:
public void process(Node externs, Node root) { Preconditions.checkState(root.isScript()); FindImportsAndExports finder = new FindImportsAndExports(); NodeTraversal.traverseEs6(compiler, root, finder); Builder<Node> exports = ImmutableList.builder(); if (finder.isCommonJsModule()) { finder.reportModuleErrors(); finder.replaceUmdPatterns(); for (Node export : finder.getModuleExports()) { if (NodeUtil.getEnclosingScript(export) != null) { exports.add(export); } } for (Node export : finder.getExports()) { if (NodeUtil.getEnclosingScript(export) != null) { exports.add(export); } } finder.addGoogProvide(); compiler.reportCodeChange(); } NodeTraversal.traverseEs6(compiler, root, new RewriteModule(finder.isCommonJsModule(), exports.build())); }
Source:
public static void doMove(final List<MoveDescription> moves, final IMoveDelegate moveDel) { final GameData data = ProData.getData(); for (int i = 0; i < moves.size(); i++) { final Route r = moves.get(i).getRoute(); if (!moves.get(i).getUnitsToTransports().isEmpty()) { continue; } for (int j = i + 1; j < moves.size(); j++) { if (!moves.get(j).getUnitsToTransports().isEmpty()) { continue; } final Route r2 = moves.get(j).getRoute(); if (r.equals(r2)) { final var mergedUnits = new ArrayList<Unit>(); mergedUnits.addAll(moves.get(j).getUnits()); mergedUnits.addAll(moves.get(i).getUnits()); moves.set(i, new MoveDescription(mergedUnits, r)); moves.remove(i); i--; break; } } } for (final MoveDescription move : moves) { if (move.getRoute() == null || move.getRoute().getEnd() == null || move.getRoute().getStart() == null) { ProLogger.warn( data.getSequence().getRound() + "-" + data.getSequence().getStep().getName() + ": route not valid " + move.getRoute() + " units: " + move.getUnits()); continue; } final String result = moveDel.performMove(move); if (result != null) { ProLogger.warn( data.getSequence().getRound() + "-" + data.getSequence().getStep().getName() + ": could not move " + move.getUnits() + " over " + move.getRoute() + " because: " + result); } if (!ProData.isSimulation) { ProUtils.pause(); } } }

Target:
public static void doMove(final List<MoveDescription> moves, final IMoveDelegate moveDel) { final GameData data = ProData.getData(); final boolean noTransportLoads = moves.stream().allMatch(move -> move.getUnitsToTransports().isEmpty()); if (noTransportLoads) { for (int i = 0; i < moves.size(); i++) { final Route r = moves.get(i).getRoute(); for (int j = i + 1; j < moves.size(); j++) { final Route r2 = moves.get(j).getRoute(); if (r.equals(r2)) { final var mergedUnits = new ArrayList<Unit>(); mergedUnits.addAll(moves.get(j).getUnits()); mergedUnits.addAll(moves.get(i).getUnits()); moves.set(j, new MoveDescription(mergedUnits, r)); moves.remove(i); i--; break; } } } } for (final MoveDescription move : moves) { if (move.getRoute().getEnd() == null || move.getRoute().getStart() == null) { ProLogger.warn( data.getSequence().getRound() + "-" + data.getSequence().getStep().getName() + ": route not valid " + move.getRoute() + " units: " + move.getUnits()); continue; } final String result = moveDel.performMove(move); if (result != null) { ProLogger.warn( data.getSequence().getRound() + "-" + data.getSequence().getStep().getName() + ": could not move " + move.getUnits() + " over " + move.getRoute() + " because: " + result); } if (!ProData.isSimulation) { ProUtils.pause(); } } }
Source:
protected boolean isVmNotLocked() { return getVmId() != null && validate(new VmValidator(getVm()).vmNotLocked()); }

Target:
protected boolean isVmNotLocked() { return getVm() != null && validate(new VmValidator(getVm()).vmNotLocked()); }