auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>void showWorkingDirectoryFileDiff(final FileDiff d) { final String p = d.getPath(); final RevCommit commit = d.getCommit(); if (commit == null) { Activator.showError(UIText.GitHistoryPage_openFailed, null); return; } IWorkbenchPage activePage = site.getWorkbenchWindow().getActivePage(); IFile file = ResourceUtil.getFileForLocation(getRepository(), p); try { if (file != null) { <START> if (!CompareUtils.canDirectlyOpenInCompare(file)) { <END> GitModelSynchronize.synchronizeModelWithWorkspace(file, getRepository(), commit.getName()); } else { CompareUtils.compareWorkspaceWithRef(getRepository(), file, commit.getName(), null); } } else { IPath path = new Path(getRepository().getWorkTree() .getAbsolutePath()).append(p); File ioFile = path.toFile(); if (ioFile.exists()) { CompareUtils.compareLocalWithRef(getRepository(), ioFile, commit.getName(), activePage); } } } catch (IOException e) { Activator.logError(UIText.GitHistoryPage_openFailed, e); Activator.showError(UIText.GitHistoryPage_openFailed, null); } }</code><technical_language>braces single line blocks</technical_language>

Target:
void showWorkingDirectoryFileDiff(final FileDiff d) { final String p = d.getPath(); final RevCommit commit = d.getCommit(); if (commit == null) { Activator.showError(UIText.GitHistoryPage_openFailed, null); return; } IWorkbenchPage activePage = site.getWorkbenchWindow().getActivePage(); IFile file = ResourceUtil.getFileForLocation(getRepository(), p); try { if (file != null) { if (!CompareUtils.canDirectlyOpenInCompare(file)) GitModelSynchronize.synchronizeModelWithWorkspace(file, getRepository(), commit.getName()); else CompareUtils.compareWorkspaceWithRef(getRepository(), file, commit.getName(), null); } else { IPath path = new Path(getRepository().getWorkTree() .getAbsolutePath()).append(p); File ioFile = path.toFile(); if (ioFile.exists()) CompareUtils.compareLocalWithRef(getRepository(), ioFile, commit.getName(), activePage); } } catch (IOException e) { Activator.logError(UIText.GitHistoryPage_openFailed, e); Activator.showError(UIText.GitHistoryPage_openFailed, null); } }
Source:
<code>private static Builder add(Builder builder, long number, String symbol) { String s = symbol.toLowerCase(); if (s.equals("y")) { return builder.addYears(number); } else if (s.equals("mo")) { return builder.addMonths(number); } else if (s.equals("w")) { return builder.addWeeks(number); } else if (s.equals("d")) { return builder.addDays(number); } else if (s.equals("h")) { return builder.addHours(number); } else if (s.equals("m")) { return builder.addMinutes(number); } else if (s.equals("s")) { return builder.addSeconds(number); } else if (s.equals("ms")) { return builder.addMillis(number); } else if (s.equals("us") || s.equals("µs")) { return builder.addMicros(number); } else if (s.equals("ns")) { return builder.addNanos(number); } <START> throw new InvalidTypeException(String.format("Unknown duration symbol '%s'", symbol)); <END> }</code><technical_language>I if InvalidTypeException is error throw here, closely related codec system this class is not. IllegalArgumentException more appropriate</technical_language>

Target:
private static Builder add(Builder builder, long number, String symbol) { String s = symbol.toLowerCase(); if (s.equals("y")) { return builder.addYears(number); } else if (s.equals("mo")) { return builder.addMonths(number); } else if (s.equals("w")) { return builder.addWeeks(number); } else if (s.equals("d")) { return builder.addDays(number); } else if (s.equals("h")) { return builder.addHours(number); } else if (s.equals("m")) { return builder.addMinutes(number); } else if (s.equals("s")) { return builder.addSeconds(number); } else if (s.equals("ms")) { return builder.addMillis(number); } else if (s.equals("us") || s.equals("µs")) { return builder.addMicros(number); } else if (s.equals("ns")) { return builder.addNanos(number); } throw new IllegalArgumentException(String.format("Unknown duration symbol '%s'", symbol)); }
Source:
<code>private void validateTemplate(Errors errors, EmailTemplate template, String fieldName, String... templateVariables) { if (template == null) { errors.rejectValue(fieldName, "is required"); } else { errors.pushNestedPath(fieldName); if (StringUtils.isBlank(template.getSubject())) { errors.rejectValue("subject", "is required"); } if (StringUtils.isBlank(template.getBody())) { errors.rejectValue("body", "is required"); } else { boolean missingTemplateVariable = true; for (int i=0; i < templateVariables.length; i++) { if (template.getBody().contains(templateVariables[i])) { <START> missingTemplateVariable = false; <END> } } if (missingTemplateVariable) { errors.rejectValue("body", "must contain one of these template variables: " + BridgeUtils.COMMA_SPACE_JOINER.join(templateVariables)); } } errors.popNestedPath(); } }</code><technical_language>Minor: break here, need check more template variables</technical_language>

Target:
private void validateTemplate(Errors errors, EmailTemplate template, String fieldName, String... templateVariables) { if (template == null) { errors.rejectValue(fieldName, "is required"); } else { errors.pushNestedPath(fieldName); if (StringUtils.isBlank(template.getSubject())) { errors.rejectValue("subject", "is required"); } if (StringUtils.isBlank(template.getBody())) { errors.rejectValue("body", "is required"); } else { boolean missingTemplateVariable = true; for (int i=0; i < templateVariables.length; i++) { if (template.getBody().contains(templateVariables[i])) { missingTemplateVariable = false; break; } } if (missingTemplateVariable) { errors.rejectValue("body", "must contain one of these template variables: " + BridgeUtils.COMMA_SPACE_JOINER.join(templateVariables)); } } errors.popNestedPath(); } }
Source:
<code>private ArtifactCoordinates getArtifactCoordinates(Path p) { <START> return ThrowingFunction.unchecked(RepositoryFiles::readCoordinates).apply((RepositoryPath) p); <END> }</code><technical_language>@adavid9 please add throws IOException TrowingFunction GroupRepositoryProvider.search</technical_language>

Target:
private ArtifactCoordinates getArtifactCoordinates(Path p) throws IOException { return RepositoryFiles.readCoordinates((RepositoryPath) p); }
Source:
<code>public void testOnNodeShutdown() throws Exception { final StreamingContext ctxSpy = Mockito.spy(createTestContext(null)); Thread t = new Thread(() -> { try { ctxSpy.streamInternal(new State() { @Override public void onEnter() { } }); } catch (final InterruptedException ignore) { } }); t.start(); t.join(1000); t = new Thread(() -> ctxSpy.onNodeShutdown()); t.start(); t.join(1000); <START> Thread.sleep(1000); <END> Mockito.verify(ctxSpy).switchState(Mockito.isA(CleanupState.class)); Mockito.verify(ctxSpy).unregisterSession(); Mockito.verify(ctxSpy).switchState(Mockito.isA(DummyState.class)); }</code><technical_language>do need this sleep? waited thread 1 second</technical_language>

Target:
public void testOnNodeShutdown() throws Exception { final StreamingContext ctxSpy = Mockito.spy(createTestContext(null)); final Thread t = new Thread(() -> { try { ctxSpy.streamInternal(new State() { @Override public void onEnter() { } }); } catch (final InterruptedException ignore) { } }); t.start(); t.join(1000); new Thread(() -> ctxSpy.onNodeShutdown()).start(); Thread.sleep(2000); Mockito.verify(ctxSpy).switchState(Mockito.isA(CleanupState.class)); Mockito.verify(ctxSpy).unregisterSession(); Mockito.verify(ctxSpy).switchState(Mockito.isA(DummyState.class)); }
Source:
<code>public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final StreamsMetadata that = (StreamsMetadata) o; if (!hostInfo.equals(that.hostInfo)) { return false; } if (!stateStoreNames.equals(that.stateStoreNames)) { return false; } if (!topicPartitions.equals(that.topicPartitions)) { return false; } if (!standbyStateStoreNames.equals(that.standbyStateStoreNames)) { return false; } <START> return standbyTopicPartitions.equals(that.standbyTopicPartitions); <END> }</code><technical_language>custom equals/hashCode methods nervous... transition touch Objects</technical_language>

Target:
public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final StreamsMetadata that = (StreamsMetadata) o; return Objects.equals(hostInfo, that.hostInfo) && Objects.equals(stateStoreNames, that.stateStoreNames) && Objects.equals(topicPartitions, that.topicPartitions) && Objects.equals(standbyStateStoreNames, that.standbyStateStoreNames) && Objects.equals(standbyTopicPartitions, that.standbyTopicPartitions); }
Source:
<code>private ChannelWriter channelWriterGroupSummaryAnnotationSupported() { return ChannelWriter.create( channelGroupResolver, "channels", "channel", new ChannelGroupSummaryWriter(idCodec()), <START> true <END> ); }</code><technical_language>Boolean arguments bad style. completely unreadable, code smell generally pass in a function instead of a flag. option is extracting enum constant implements a method, (worse), this 5 arguments, extract a builder a named method flips this flag</technical_language>

Target:
private ChannelWriter channelWriterGroupSummaryAnnotationSupported() { return ChannelWriter.builder() .channelGroupResolver(channelGroupResolver) .listName("channels") .fieldName("channel") .channelGroupSummaryWriter(new ChannelGroupSummaryWriter(idCodec())) .buildWithGroupSummaryAnnotationSupported(); }
Source:
<code>public List<AuthorizationAttribute> getAll() { return Stream.of( Optional.ofNullable(this.readers).orElse(new ArrayList<>()), Optional.ofNullable(this.writers).orElse(new ArrayList<>()), <START> Optional.ofNullable(this.admins).orElse(new ArrayList<>())) <END> .flatMap(Collection::stream).collect(Collectors.toList()); }</code><technical_language>I sense check for null is marked @Nullable In Nakadi not-nullable-by-default practice allows code clean unnecessary null checks</technical_language>

Target:
public List<AuthorizationAttribute> getAll() { return Stream.of(this.writers, this.admins, this.readers) .flatMap(Collection::stream).collect(Collectors.toList()); }
Source:
<code>public Authentication authenticate(Authentication authentication) throws AuthenticationException { <START> if (!supports(authentication.getClass())) <END> throw new IllegalArgumentException("Only TwoFactorAuthenticationToken is supported"); TwoFactorAuthenticationToken authToken = (TwoFactorAuthenticationToken) authentication; if (!twoFactorAuthenticationService.isConfiguredForUser()) { if (authToken.getSecretKey() != null) { if (otpService.tryVerificationCode(authToken.getVerificationCode(), authToken.getSecretKey())) { activateTwoFactorAuthentication(authToken); UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext() .getAuthentication() .getPrincipal(); authToken = new TwoFactorAuthenticationToken(userDetails, userDetails.getPassword(), userDetails.getAuthorities(), authToken.getVerificationCode(), authToken.getSecretKey()); } } else { throw new BadCredentialsException("Invalid secret generated"); } } else { if (authToken.getVerificationCode() != null) { if (twoFactorAuthenticationService.isVerificationCodeValidForUser(authToken.getVerificationCode())) { UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext() .getAuthentication() .getPrincipal(); authToken = new TwoFactorAuthenticationToken(userDetails, userDetails.getPassword(), userDetails.getAuthorities(), authToken.getVerificationCode(), null); } } else { throw new BadCredentialsException("Invalid verificationcode entered"); } } return authToken; }</code><technical_language>if ... { ... }</technical_language>

Target:
public Authentication authenticate(Authentication authentication) throws AuthenticationException { if (!supports(authentication.getClass())) { throw new IllegalArgumentException("Only TwoFactorAuthenticationToken is supported"); } TwoFactorAuthenticationToken authToken = (TwoFactorAuthenticationToken) authentication; if (!twoFactorAuthenticationService.isConfiguredForUser()) { if (authToken.getSecretKey() != null) { if (otpService.tryVerificationCode(authToken.getVerificationCode(), authToken.getSecretKey())) { activateTwoFactorAuthentication(authToken); UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext() .getAuthentication() .getPrincipal(); authToken = new TwoFactorAuthenticationToken(userDetails, userDetails.getPassword(), userDetails.getAuthorities(), authToken.getVerificationCode(), authToken.getSecretKey()); } } else { throw new BadCredentialsException("Invalid secret generated"); } } else { if (authToken.getVerificationCode() != null) { if (twoFactorAuthenticationService.isVerificationCodeValidForUser(authToken.getVerificationCode())) { UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext() .getAuthentication() .getPrincipal(); authToken = new TwoFactorAuthenticationToken(userDetails, userDetails.getPassword(), userDetails.getAuthorities(), authToken.getVerificationCode(), null); } } else { throw new BadCredentialsException("Invalid verification code entered"); } } return authToken; }
Source:
<code><START> @Override public byte getBaseMapColor() { <END> return ((Number) get("baseMapColor")).byteValue(); }</code><technical_language>Put annotation a separate line</technical_language>

Target:
public byte getBaseMapColor() { return ((Number) get("baseMapColor")).byteValue(); }
Source:
<code>public void assertUnitPlan(@Language("SQL") String sql, PlanMatchPattern pattern) { <START> List<PlanOptimizer> optimizeBeforeTranslation = ImmutableList.of( <END> new UnaliasSymbolReferences(getMetadata().getFunctionManager()), new AddExchanges(getQueryRunner().getMetadata(), new SqlParser()), new PruneUnreferencedOutputs(), new IterativeOptimizer( new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), new TranslateExpressions(getQueryRunner().getMetadata(), new SqlParser()).rules()), new IterativeOptimizer( new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections()))); List<PlanOptimizer> optimizeAfterTranslation = ImmutableList.of( new AddExchanges(getQueryRunner().getMetadata(), new SqlParser()), new IterativeOptimizer( new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), new TranslateExpressions(getMetadata(), new SqlParser()).rules()), new UnaliasSymbolReferences(getMetadata().getFunctionManager()), new PruneUnreferencedOutputs(), new IterativeOptimizer( new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections()))); assertPlan(sql, pattern, optimizeBeforeTranslation); assertPlan(sql, pattern, optimizeAfterTranslation); }</code><technical_language>optimize*r*</technical_language>

Target:
public void assertUnitPlan(@Language("SQL") String sql, PlanMatchPattern pattern) { List<PlanOptimizer> optimizersBeforeTranslation = ImmutableList.of( new UnaliasSymbolReferences(getMetadata().getFunctionManager()), new AddExchanges(getQueryRunner().getMetadata(), new SqlParser()), new PruneUnreferencedOutputs(), new IterativeOptimizer( new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), new TranslateExpressions(getQueryRunner().getMetadata(), new SqlParser()).rules()), new IterativeOptimizer( new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections()))); List<PlanOptimizer> optimizersAfterTranslation = ImmutableList.of( new AddExchanges(getQueryRunner().getMetadata(), new SqlParser()), new IterativeOptimizer( new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), new TranslateExpressions(getMetadata(), new SqlParser()).rules()), new UnaliasSymbolReferences(getMetadata().getFunctionManager()), new PruneUnreferencedOutputs(), new IterativeOptimizer( new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections()))); assertPlan(sql, pattern, optimizersBeforeTranslation); assertPlan(sql, pattern, optimizersAfterTranslation); }
Source:
<code>private List<AccessPointDTO> adapt(List<AccessPoint> aps) { List<AccessPointDTO> dtos = Lists.newArrayList(); for (AccessPoint ap : aps) { <START> dtos.add(new AccessPointDTO(ap.id.value, ap.ip, ap.mac.value, ap.serialNumber, ap.model, adapt(ap.venue), adapt(ap.location), adapt(ap.capabilities))); <END> } return dtos; }</code><technical_language>I understand adapt method..</technical_language>

Target:
private List<AccessPointDTO> adapt(List<AccessPoint> aps) { List<AccessPointDTO> dtos = Lists.newArrayList(); for (AccessPoint ap : aps) { dtos.add(adapt(ap)); } return dtos; }
Source:
<code>private void doSortBy() { Resources r = getActivity().getResources(); SharedPreferences settings = Application.getPrefs(); String currentValue = settings .getString(getString(R.string.preference_key_arrival_info_style), null); String[] styles = getResources() .getStringArray(R.array.arrival_info_style_options); int newValue; if (currentValue.equalsIgnoreCase(styles[0])) { Toast.makeText(getActivity(), r.getString(R.string.stop_info_option_sort_route), Toast.LENGTH_SHORT).show(); newValue = 1; ObaAnalytics.reportEventWithCategory(ObaAnalytics.ObaEventCategory.UI_ACTION.toString(), getActivity().getString(R.string.analytics_action_button_press), <START> getActivity().getString(R.string.analytics_label_sort_by_eta_arrival)); <END> } else { newValue = 0; Toast.makeText(getActivity(), r.getString(R.string.stop_info_option_sort_eta), Toast.LENGTH_SHORT).show(); ObaAnalytics.reportEventWithCategory(ObaAnalytics.ObaEventCategory.UI_ACTION.toString(), getActivity().getString(R.string.analytics_action_button_press), getActivity().getString(R.string.analytics_label_sort_by_route_arrival)); } PreferenceHelp.saveString(getResources() .getString(R.string.preference_key_arrival_info_style), styles[newValue]); checkAdapterStylePreference(); refreshLocal(); }</code><technical_language>I this analytics_label_sort_by_route_arrival - match Toast message</technical_language>

Target:
private void doSortBy() { Resources r = getActivity().getResources(); SharedPreferences settings = Application.getPrefs(); String currentValue = settings .getString(getString(R.string.preference_key_arrival_info_style), null); String[] styles = getResources() .getStringArray(R.array.arrival_info_style_options); int newValue; if (currentValue.equalsIgnoreCase(styles[0])) { Toast.makeText(getActivity(), r.getString(R.string.stop_info_option_sort_route), Toast.LENGTH_SHORT).show(); newValue = 1; ObaAnalytics.reportEventWithCategory(ObaAnalytics.ObaEventCategory.UI_ACTION.toString(), getActivity().getString(R.string.analytics_action_button_press), getActivity().getString(R.string.analytics_label_sort_by_route_arrival)); } else { newValue = 0; Toast.makeText(getActivity(), r.getString(R.string.stop_info_option_sort_eta), Toast.LENGTH_SHORT).show(); ObaAnalytics.reportEventWithCategory(ObaAnalytics.ObaEventCategory.UI_ACTION.toString(), getActivity().getString(R.string.analytics_action_button_press), getActivity().getString(R.string.analytics_label_sort_by_eta_arrival)); } PreferenceHelp.saveString(getResources() .getString(R.string.preference_key_arrival_info_style), styles[newValue]); checkAdapterStylePreference(); refreshLocal(); }
Source:
<code>public void setup() throws Exception { graphTestHandler = new TestingGraphMockHandler(); graph = TestingGraphInstanceBuilder.newGraph1(graphTestHandler); TestingGraphInstanceBuilder.createDefaultRulesForGraph1(graphTestHandler.ruleSet); when(cacheBuilder.apply(anyString())).thenReturn(cache); when(cache.getRuleSet()).thenReturn(graphTestHandler.ruleSet); CanConnect connectionRule = (CanConnect) ((List<Rule>) graphTestHandler.ruleSet.getRules()).get(0); when(cache.getConnectionRules()).thenReturn(Collections.singletonList(connectionRule)); when(cache.getDefinitions(contains("label1"))).thenReturn(Arrays.asList(TestingGraphInstanceBuilder.DEF1_ID).stream().collect(Collectors.toSet())); <START> when(cache.getDefinitions(contains("label2"))).thenReturn(Arrays.asList(TestingGraphInstanceBuilder.DEF2_ID).stream().collect(Collectors.toSet())); <END> when(definitionsRegistry.getLabels(eq(TestingGraphInstanceBuilder.DEF1_ID))).thenReturn(TestingGraphInstanceBuilder.DEF1_LABELS); when(definitionsRegistry.getLabels(eq(TestingGraphInstanceBuilder.DEF2_ID))).thenReturn(TestingGraphInstanceBuilder.DEF2_LABELS); tested = new CommonDomainLookups(graphTestHandler.definitionUtils, definitionsRegistry, graphTestHandler.ruleManager, cacheBuilder) .setDomain("ds1"); }</code><technical_language>simplified to: Stream.of(TestingGraphInstanceBuilder.DEF1_ID).collect(Collectors.toSet())</technical_language>

Target:
public void setup() throws Exception { final TestingGraphMockHandler graphTestHandler = new TestingGraphMockHandler(); graph = TestingGraphInstanceBuilder.newGraph1(graphTestHandler); TestingGraphInstanceBuilder.createDefaultRulesForGraph1(graphTestHandler.ruleSet); when(cacheBuilder.apply(anyString())).thenReturn(cache); when(cache.getRuleSet()).thenReturn(graphTestHandler.ruleSet); CanConnect connectionRule = (CanConnect) ((List<Rule>) graphTestHandler.ruleSet.getRules()).get(0); when(cache.getConnectionRules()).thenReturn(Collections.singletonList(connectionRule)); when(cache.getDefinitions(contains("label1"))).thenReturn(Stream.of(TestingGraphInstanceBuilder.DEF1_ID).collect(Collectors.toSet())); when(cache.getDefinitions(contains("label2"))).thenReturn(Stream.of(TestingGraphInstanceBuilder.DEF2_ID).collect(Collectors.toSet())); when(definitionsRegistry.getLabels(eq(TestingGraphInstanceBuilder.DEF1_ID))).thenReturn(TestingGraphInstanceBuilder.DEF1_LABELS); when(definitionsRegistry.getLabels(eq(TestingGraphInstanceBuilder.DEF2_ID))).thenReturn(TestingGraphInstanceBuilder.DEF2_LABELS); tested = new CommonDomainLookups(graphTestHandler.definitionUtils, definitionsRegistry, graphTestHandler.ruleManager, cacheBuilder) .setDomain("ds1"); }
Source:
<code>public Agent() { this.logger = Logger.getLogger( getClass().getName()); <START> this.messagingType = MessagingConstants.FACTORY_RABBIT_MQ; <END> try { this.ipAddress = InetAddress.getLocalHost().getHostAddress(); } catch( UnknownHostException e ) { this.ipAddress = "127.0.0.1"; this.logger.warning( "The IP address could not be found. " + e.getMessage()); Utils.logException( this.logger, e ); } }</code><technical_language>default for messaging type. Indeed, this sense if implementation bundle is deployed</technical_language>

Target:
public Agent() { this.logger = Logger.getLogger( getClass().getName()); try { this.ipAddress = InetAddress.getLocalHost().getHostAddress(); } catch( UnknownHostException e ) { this.ipAddress = "127.0.0.1"; this.logger.warning( "The IP address could not be found. " + e.getMessage()); Utils.logException( this.logger, e ); } }
Source:
<code>public NoiseEvent(final long startTimestamp, final long endTimestamp, final int offsetMillis) { super(Type.NOISE, startTimestamp, endTimestamp, offsetMillis); final DateTime noiseDateTime = new DateTime(startTimestamp, DateTimeZone.UTC).plusMillis(offsetMillis); <START> this.description += " " + noiseDateTime.toString(DateTimeFormat.forPattern("HH:mm")); <END> }</code><technical_language>String.format instead of string concatenation</technical_language>

Target:
public NoiseEvent(final long startTimestamp, final long endTimestamp, final int offsetMillis) { super(Type.NOISE, startTimestamp, endTimestamp, offsetMillis); }
Source:
<code>private List<Set<TopicPartition>> batchPartitionsByLeader(@NotNull Set<TopicPartition> topicPartitions) { <START> if (!_enablePartitionLeadershipCalculation) { <END> return Collections.singletonList(topicPartitions); } final Map<Node, Set<TopicPartition>> assignedPartitions = new HashMap<>(); final Set<TopicPartition> unassignedPartitions = new HashSet<>(); topicPartitions.forEach(topicPartition -> { @Nullable final Node leader = _partitionLeadershipMap.get(topicPartition); if (leader == null) { LOG.debug("Leader unknown for topic partition {}", topicPartition); unassignedPartitions.add(topicPartition); } else { LOG.trace("Leader for topic partition is {}", topicPartition, leader); assignedPartitions.computeIfAbsent(leader, s -> new HashSet<>()).add(topicPartition); } }); final List<Set<TopicPartition>> batches = new ArrayList<>(); batches.addAll(assignedPartitions.values()); batches.add(unassignedPartitions); return batches; }</code><technical_language>nit: want do if _partitionLeadershipMap is empty/null</technical_language>

Target:
private List<Set<TopicPartition>> batchPartitionsByLeader(@NotNull Set<TopicPartition> topicPartitions) { if (!_enablePartitionLeadershipCalculation || _partitionLeadershipMap.isEmpty()) { if (_partitionLeadershipMap.isEmpty()) { LOG.debug("Leadership unknown for all topic partitions"); } return Collections.singletonList(topicPartitions); } final Map<Node, Set<TopicPartition>> assignedPartitions = new HashMap<>(); final Set<TopicPartition> unassignedPartitions = new HashSet<>(); topicPartitions.forEach(topicPartition -> { @Nullable final Node leader = _partitionLeadershipMap.get(topicPartition); if (leader == null) { LOG.debug("Leader unknown for topic partition {}", topicPartition); unassignedPartitions.add(topicPartition); } else { LOG.trace("Leader for topic partition is {}", topicPartition, leader); assignedPartitions.computeIfAbsent(leader, s -> new HashSet<>()).add(topicPartition); } }); final List<Set<TopicPartition>> batches = new ArrayList<>(); batches.addAll(assignedPartitions.values()); batches.add(unassignedPartitions); return batches; }
Source:
<code>public int hashCode() { <START> return Arrays.hashCode(arr); <END> }</code><technical_language>Inconsistent equals</technical_language>

Target:
public int hashCode() { return arr.length; }
Source:
<code>public EventHeaderDefinition createDefinition(IDefinitionScope definitionScope, String fieldName, BitBuffer input) throws CTFReaderException { alignRead(input); ByteOrder bo = input.getByteOrder(); input.setByteOrder(fByteOrder); int enumId = (int) input.get(COMPACT_ID, false); if (enumId != EXTENDED_VALUE) { long timestamp2 = input.get(COMPACT_TS, false); input.setByteOrder(bo); return new EventHeaderDefinition(this, enumId, timestamp2, COMPACT_TS); } input.position(input.position() + 3); <START> long id = input.get(ID_SIZE, false); <END> long timestampLong = input.get(FULL_TS, false); input.setByteOrder(bo); return new EventHeaderDefinition(this, id, timestampLong, FULL_TS); }</code><technical_language>fine save a long here, check limits etc. calling constructor below</technical_language>

Target:
public EventHeaderDefinition createDefinition(IDefinitionScope definitionScope, String fieldName, BitBuffer input) throws CTFReaderException { alignRead(input); ByteOrder bo = input.getByteOrder(); input.setByteOrder(fByteOrder); int enumId = (int) input.get(COMPACT_ID, false); if (enumId != EXTENDED_VALUE) { long timestamp2 = input.get(COMPACT_TS, false); input.setByteOrder(bo); return new EventHeaderDefinition(this, enumId, timestamp2, COMPACT_TS); } input.position(input.position() + 3); long id = input.get(ID_SIZE, false); if( id > Integer.MAX_VALUE){ throw new CTFReaderException("ID "+ id + " larger than " + Integer.MAX_VALUE + " is currently unsupported by the parser"); } long timestampLong = input.get(FULL_TS, false); input.setByteOrder(bo); return new EventHeaderDefinition(this, (int) id, timestampLong, FULL_TS); }
Source:
<code>public ModelAndView index(Request request, Response response) { HashMap<Object, Object> object = new HashMap<Object, Object>() {{ put("viewTitle", "Dashboard"); put("isQuickEditPageEnabled", Toggles.isToggleOn(Toggles.PIPELINE_CONFIG_SINGLE_PAGE_APP) && Toggles.isToggleOn(Toggles.QUICK_EDIT_PAGE_DEFAULT)); put("isNewDashboardPageEnabled", Toggles.isToggleOn(Toggles.NEW_DASHBOARD_PAGE_DEFAULT)); <START> put("isUserAnAdmin", securityService.isUserAdmin(currentUsername())); <END> }}; return new ModelAndView(object, "new_dashboard/index.vm"); }</code><technical_language>show pipeline level analytics for pipeline group admins well</technical_language>

Target:
public ModelAndView index(Request request, Response response) { HashMap<Object, Object> object = new HashMap<Object, Object>() {{ put("viewTitle", "Dashboard"); put("isQuickEditPageEnabled", Toggles.isToggleOn(Toggles.PIPELINE_CONFIG_SINGLE_PAGE_APP) && Toggles.isToggleOn(Toggles.QUICK_EDIT_PAGE_DEFAULT)); put("isNewDashboardPageEnabled", Toggles.isToggleOn(Toggles.NEW_DASHBOARD_PAGE_DEFAULT)); put("shouldShowAnalyticsIcon", securityService.isUserAdmin(currentUsername())); }}; return new ModelAndView(object, "new_dashboard/index.vm"); }
Source:
<code>public void apply(LogReplicationEntry message) { verifyMetadata(message.getMetadata()); if (message.getMetadata().getSnapshotSyncSeqNum() != recvSeq || message.getMetadata().getMessageMetadataType() != MessageType.SNAPSHOT_MESSAGE) { <START> log.error("Received Expecting sequencer != recvSeq or wrong message type expecting {}", <END> message.getMetadata(), message.getMetadata().getSnapshotSyncSeqNum(), recvSeq, message.getMetadata().getMessageMetadataType(), MessageType.SNAPSHOT_MESSAGE); throw new ReplicationWriterException("Message is out of order or wrong type"); } if (message.getOpaqueEntryList().size() > 1) { log.error(" Get instead of one opaque entry in Snapshot Message", message.getOpaqueEntryList().size()); return; } for (OpaqueEntry opaqueEntry : message.getOpaqueEntryList()) { if (opaqueEntry.getEntries().keySet().size() != 1) { log.error("The opaqueEntry has more than one entry {}", opaqueEntry); return; } UUID uuid = opaqueEntry.getEntries().keySet().stream().findFirst().get(); processOpaqueEntry(opaqueEntry.getEntries().get(uuid), message.getMetadata().getSnapshotSyncSeqNum(), uuidMap.get(uuid)); recvSeq++; } }</code><technical_language>sequencer -> sequence number</technical_language>

Target:
public void apply(LogReplicationEntry message) { verifyMetadata(message.getMetadata()); if (message.getMetadata().getSnapshotSyncSeqNum() != recvSeq || message.getMetadata().getMessageMetadataType() != MessageType.SNAPSHOT_MESSAGE) { log.error("Received Expecting snapshot message sequencer number != recvSeq or wrong message type expecting {}", message.getMetadata(), message.getMetadata().getSnapshotSyncSeqNum(), recvSeq, message.getMetadata().getMessageMetadataType(), MessageType.SNAPSHOT_MESSAGE); throw new ReplicationWriterException("Message is out of order or wrong type"); } if (message.getOpaqueEntryList().size() > 1) { log.error(" Get instead of one opaque entry in Snapshot Message", message.getOpaqueEntryList().size()); return; } OpaqueEntry opaqueEntry = message.getOpaqueEntryList().get(0); if (opaqueEntry.getEntries().keySet().size() != 1) { log.error("The opaqueEntry has more than one entry {}", opaqueEntry); return; } UUID uuid = opaqueEntry.getEntries().keySet().stream().findFirst().get(); processOpaqueEntry(opaqueEntry.getEntries().get(uuid), message.getMetadata().getSnapshotSyncSeqNum(), uuidMap.get(uuid)); recvSeq++; }
Source:
<code>private List<RepositoryChangeLog> getLogsByStoreKey( StoreKey storeKey ) { return changeLogCache.execute( c -> c.values() .stream() .filter( ch -> ch.getStoreKey().equals( storeKey ) ) .collect( Collectors.toList() ) ); <START> } <END></code><technical_language>I happen if sorting result set. return log entries ordered insertion time</technical_language>

Target:
private List<RepositoryChangeLog> getLogsByStoreKey( StoreKey storeKey ) { final ArrayList<RepositoryChangeLog> results = new ArrayList<>( RESULT_LIMITATION_FOR_TESTING ); return changeLogCache.execute( c -> { for ( RepositoryChangeLog log : c.values() ) { if ( log.getStoreKey().equals( storeKey ) ) { results.add( log ); } if ( results.size() >= RESULT_LIMITATION_FOR_TESTING ) { return results; } } return results; } ); }
Source:
<code>public String getMetricId() { <START> return idIfTypeCorrect(CanonicalPath.this, Resource.class); <END> }</code><technical_language>--||---</technical_language>

Target:
public String getMetricId() { return idIfTypeCorrect(CanonicalPath.this, Metric.class); }
Source:
<code>private String createPipelineAndGetConsole(final CustomConfig customConfig) { final WorkflowJob job = jenkins.jobs.create(WorkflowJob.class); job.script.set(String.format("node {\n" + " configFileProvider(\n" + " [configFile(fileId: '%s')]) {\n" + " \n" + <START> " sh 'echo test_custom '\n" + <END> " }\n" + "}", customConfig.id())); job.save(); final Build b = job.startBuild().shouldSucceed(); return b.getConsole(); }</code><technical_language>s/echo/cat/</technical_language>

Target:
private String createPipelineAndGetConsole(final CustomConfig customConfig) { final WorkflowJob job = jenkins.jobs.create(WorkflowJob.class); job.script.set(String.format("node {\n" + " configFileProvider(\n" + " [configFile(fileId: '%s', variable: 'CUSTOM_SETTINGS')]) {\n" + " \n" + " sh 'cat $CUSTOM_SETTINGS '\n" + " }\n" + "}", customConfig.id())); job.save(); final Build b = job.startBuild().shouldSucceed(); return b.getConsole(); }
Source:
<code>public void customTagsAreWrittenToDb() throws Exception { <START> TAGS.put("custom","customTag"); <END> InfluxDbWriter writer = getTestInfluxDbWriterWithDefaultSettings(); writer.doWrite(dummyServer(), dummyQuery(), results); verify(influxDB).write(messageCaptor.capture()); BatchPoints batchPoints = messageCaptor.getValue(); assertThat(batchPoints.getDatabase()).isEqualTo(DATABASE_NAME); List<Point> points = batchPoints.getPoints(); assertThat(points).hasSize(1); Point point = points.get(0); assertThat(point.lineProtocol()).contains("custom=customTag"); }</code><technical_language>strange indentation here..</technical_language>

Target:
public void customTagsAreWrittenToDb() throws Exception { ImmutableMap<String, String> tags = ImmutableMap.of("customTag", "customValue"); InfluxDbWriter writer = getTestInfluxDbWriterWithCustomTags(tags); writer.doWrite(dummyServer(), dummyQuery(), results); verify(influxDB).write(messageCaptor.capture()); BatchPoints batchPoints = messageCaptor.getValue(); assertThat(batchPoints.getDatabase()).isEqualTo(DATABASE_NAME); List<Point> points = batchPoints.getPoints(); assertThat(points).hasSize(1); Point point = points.get(0); assertThat(point.lineProtocol()).contains("customTag=customValue"); }
Source:
<code><START> public void reset(ColumnValueSelector selector) <END> { isNullResult = true; delegate.reset(selector); }</code><technical_language>body of this method java if (selector.isNull()) { isNullResult = true; } else { isNullResult = false; delegate.reset(selector); }</technical_language>

Target:
public void reset(ColumnValueSelector selector) { if (selector.isNull()) { isNullResult = true; } else { isNullResult = false; delegate.reset(selector); } }
Source:
<code>protected boolean createKeys(List<Long> list) { if (skCase == null) { return true; } interestingResults.getArtifactIds(setName).forEach((id) -> { try { BlackboardArtifact art = skCase.getBlackboardArtifact(id); artifactHits.put(id, art); list.add(id); <START> } catch (TskCoreException ex) { <END> logger.log(Level.WARNING, "TSK Exception occurred", ex); } }); return true; }</code><technical_language>this is a case database error, please change log level SEVERE instead of WARNING, while in this code</technical_language>

Target:
protected boolean createKeys(List<Long> list) { if (skCase == null) { return true; } interestingResults.getArtifactIds(setName).forEach((id) -> { try { BlackboardArtifact art = skCase.getBlackboardArtifact(id); artifactHits.put(id, art); list.add(id); } catch (TskCoreException ex) { logger.log(Level.SEVERE, "TSK Exception occurred", ex); } }); return true; }
Source:
<code>ReceiveConfig(Config config) { allowCreates = true; allowDeletes = !config.getBoolean("receive", "denydeletes", false); allowNonCommitToHead = <START> config.getBoolean("receivepack", <END> "allowNonCommitToHead", false); allowNonFastForwards = !config.getBoolean("receive", "denynonfastforwards", false); allowOfsDelta = config.getBoolean("repack", "usedeltabaseoffset", true); allowPushOptions = config.getBoolean("receive", "pushoptions", false); maxCommandBytes = config.getLong("receive", "maxCommandBytes", 3 << 20); maxDiscardBytes = config.getLong("receive", "maxCommandDiscardBytes", -1); signedPush = SignedPushConfig.KEY.parse(config); }</code><technical_language>this</technical_language>

Target:
ReceiveConfig(Config config) { allowCreates = true; allowDeletes = !config.getBoolean("receive", "denydeletes", false); allowNonCommitToHead = config.getBoolean("receive", "allowNonCommitToHead", false); allowNonFastForwards = !config.getBoolean("receive", "denynonfastforwards", false); allowOfsDelta = config.getBoolean("repack", "usedeltabaseoffset", true); allowPushOptions = config.getBoolean("receive", "pushoptions", false); maxCommandBytes = config.getLong("receive", "maxCommandBytes", 3 << 20); maxDiscardBytes = config.getLong("receive", "maxCommandDiscardBytes", -1); signedPush = SignedPushConfig.KEY.parse(config); }
Source:
<code><START> public static <END> Color getSystemForegroundColor(Display display) { ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); Color foreground = colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (foreground == null) { return JFaceColors.getInformationViewerForegroundColor(display); } return foreground; }</code><technical_language>need public, if package is internal</technical_language>

Target:
private static Color getSystemForegroundColor(Display display) { ColorRegistry colorRegistry = JFaceResources.getColorRegistry(); Color foreground = colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (foreground == null) { return JFaceColors.getInformationViewerForegroundColor(display); } return foreground; }
Source:
<code>protected T newInstance(final String alias, final CacheConfiguration<?, ?> cacheConfiguration) { Class<? extends T> clazz = null; for (ServiceConfiguration<?> serviceConfiguration : cacheConfiguration.getServiceConfigurations()) { <START> if(cacheLevelConfig.isAssignableFrom(serviceConfiguration.getClass()) && !configAdded.contains(serviceConfiguration)) { <END> clazz = cacheLevelConfig.cast(serviceConfiguration).getClazz(); configAdded.add(serviceConfiguration); break; } } if(clazz == null) { clazz = getPreconfigured(alias); } try { return clazz != null ? clazz.newInstance() : null; } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } }</code><technical_language>This works iteration in order in EhcacheManager bothers a lot. a side note, I some opinions supporting more listener. point discussed first. start a conversation for this dev mailing list</technical_language>

Target:
protected T newInstance(final String alias, final CacheConfiguration<?, ?> cacheConfiguration) { Class<? extends T> clazz = null; for (ServiceConfiguration<?> serviceConfiguration : cacheConfiguration.getServiceConfigurations()) { if(cacheLevelConfig.isAssignableFrom(serviceConfiguration.getClass())) { clazz = cacheLevelConfig.cast(serviceConfiguration).getClazz(); } } return newInstance(alias, clazz); }
Source:
<code>public Secret getSecret(String projectId, String secretId) throws IOException { try (SecretManagerServiceClient client = SecretManagerServiceClient.create()) { SecretName name = SecretName.of(projectId, secretId); GetSecretRequest request = GetSecretRequest.newBuilder().setName(name.toString()).build(); Secret secret = client.getSecret(request); String replication = ""; if (secret.getReplication().getAutomatic() != null) { replication = "AUTOMATIC"; } else if (secret.getReplication().getUserManaged() != null) { replication = "MANAGED"; } System.out.printf("Secret %s, replication %s\n", secret.getName(), replication); return secret; <START> } <END> }</code><technical_language>This API a bit funky - reason getReplication return Enum ReplicationType something? Is True if set else null? Also, throw exception in case neither</technical_language>

Target:
public void getSecret(String projectId, String secretId) throws IOException { try (SecretManagerServiceClient client = SecretManagerServiceClient.create()) { SecretName name = SecretName.of(projectId, secretId); GetSecretRequest request = GetSecretRequest.newBuilder().setName(name.toString()).build(); Secret secret = client.getSecret(request); String replication = ""; if (secret.getReplication().getAutomatic() != null) { replication = "AUTOMATIC"; } else if (secret.getReplication().getUserManaged() != null) { replication = "MANAGED"; } else { throw new IllegalStateException("Unknown replication type"); } System.out.printf("Secret %s, replication %s\n", secret.getName(), replication); } }
Source:
<code>ValueCache(final JSONObject param) { type = ModelStructureCache.ValueType.get(param.getString("type")); if (type == ModelStructureCache.ValueType.ENUM) { enumNames = new ArrayList<String>(); JSONObject enumOrigin = null; String enumOriginName = param.getString("enum_origin"); <START> enumOrigin = ModelStructureCache.getEnumOrigin(enumOriginName); <END> JSONArray enums = enumOrigin.getJSONObject("structure") .getJSONArray("enums"); for (int num = 0; num < enums.length(); num++) enumNames.add(enums.getString(num)); } else enumNames = null; }</code><technical_language>JSONObject ..</technical_language>

Target:
ValueCache(final JSONObject param) { type = ModelStructureCache.ValueType.get(param.getString("type")); if (type == ModelStructureCache.ValueType.ENUM) { enumNames = new ArrayList<String>(); String enumOriginName = param.getString("enum_origin"); JSONObject enumOrigin = ModelStructureCache.getEnumOrigin(enumOriginName); JSONArray enums = enumOrigin.getJSONObject("structure") .getJSONArray("enums"); for (int num = 0; num < enums.length(); num++) enumNames.add(enums.getString(num)); } else enumNames = null; }
Source:
<code>private void internalEndSuccessfully() { log.info("Ending command '{}' successfully.", getClass().getName()); boolean clearCompensation = true; try { endSuccessfully(); } catch <START> (Exception e) <END> { clearCompensation = false; } finally { if (clearCompensation) { if (getCommandCompensationPhase() == CommandCompensationPhase.END_COMMAND) { getCompensationContext().cleanupCompensationDataAfterSuccessfulCommand(); } } else { if (getCommandCompensationPhase() == CommandCompensationPhase.END_COMMAND) { compensate(); } } } }</code><technical_language>catch narrower here</technical_language>

Target:
private void internalEndSuccessfully() { log.info("Ending command '{}' successfully.", getClass().getName()); boolean clearCompensation = true; try { endSuccessfully(); } catch (Exception e) { clearCompensation = false; } finally { if (getCommandCompensationPhase() == NonTransactiveCommandAttribute.CommandCompensationPhase.END_COMMAND) { if (clearCompensation) { getCompensationContext().cleanupCompensationDataAfterSuccessfulCommand(); } else { compensate(); } } } }
Source:
<code>private Collection<ValueFrequency> moveUniqueToEnd(Collection<ValueFrequency> valueCounts) { ValueFrequency uniqueValueFrequency = null; for (ValueFrequency valueFrequency : valueCounts) { if ("<unique>".equals(valueFrequency.getName())) { uniqueValueFrequency = valueFrequency; break; } } if (uniqueValueFrequency != null) { <START> List<ValueFrequency> valueCountsList = new ArrayList<>(valueCounts); <END> valueCountsList.remove(uniqueValueFrequency); valueCountsList.add(uniqueValueFrequency); return valueCountsList; } else { return valueCounts; } }</code><technical_language>final. :-P</technical_language>

Target:
private Collection<ValueFrequency> moveUniqueToEnd(Collection<ValueFrequency> valueCounts) { ValueFrequency uniqueValueFrequency = null; for (ValueFrequency valueFrequency : valueCounts) { if ("<unique>".equals(valueFrequency.getName())) { uniqueValueFrequency = valueFrequency; break; } } if (uniqueValueFrequency != null) { final List<ValueFrequency> valueCountsList = new ArrayList<>(valueCounts); valueCountsList.remove(uniqueValueFrequency); valueCountsList.add(uniqueValueFrequency); return valueCountsList; } else { return valueCounts; } }
Source:
<code>public static String resolveRelativeVolumeBinding(File baseDir, String bindingString) { if (!baseDir.isAbsolute()) { throw new IllegalArgumentException("Base directory '" + baseDir + "' must be absolute."); } String[] pathParts = bindingString.split(":"); String localPath = pathParts[0]; String serverPath = (pathParts.length > 1) ? pathParts[1] : ""; <START> if (localPath.startsWith("./")) { <END> localPath = new File(baseDir, localPath.substring(2)).getAbsolutePath(); } if (localPath.startsWith("~/")) { localPath = new File(System.getProperty("user.home"), localPath.substring(2)).getAbsolutePath(); } if (serverPath.length() > 0) { return String.format("%s:%s", localPath, serverPath); } return localPath; }</code><technical_language>a option File#getCanonicalPath method resolve relative paths. ../ is resolved correctly</technical_language>

Target:
public static String resolveRelativeVolumeBinding(File baseDir, String bindingString) { String[] pathParts = bindingString.split(":"); String localPath = pathParts[0]; if (isRelativePath(localPath)) { File resolvedFile; if (isUserHomeRelativePath(localPath)) { resolvedFile = resolveAbsolutely(prepareUserHomeRelativePath(localPath), System.getProperty("user.home")); } else { if (!baseDir.isAbsolute()) { throw new IllegalArgumentException("Base directory '" + baseDir + "' must be absolute."); } resolvedFile = resolveAbsolutely(localPath, baseDir.getAbsolutePath()); } try { localPath = resolvedFile.getCanonicalFile().getAbsolutePath(); } catch (IOException e) { throw new RuntimeException("Unable to canonicalize '" + resolvedFile + "'"); } } if (pathParts.length > 1) { pathParts[0] = localPath; return join(":", pathParts); } return localPath; }
Source:
<code>public void performAction() { FileSet selectedFiles; selectedFiles = mainFrame.getActiveTable().getSelectedFiles(); <START> if(command.hasKeywordToken() && selectedFiles.size() == 0) <END> return; if(selectedFiles.getBaseFolder().getURL().getScheme().equals(FileProtocols.FILE) && (selectedFiles.getBaseFolder().hasAncestor(LocalFile.class))) { try {ProcessRunner.execute(command.getTokens(selectedFiles), selectedFiles.getBaseFolder());} catch(Exception e) { InformationDialog.showErrorDialog(mainFrame); LOGGER.debug("Failed to execute command: " + command.getCommand(), e); } } else { ProgressDialog progressDialog = new ProgressDialog(mainFrame, Translator.get("copy_dialog.copying")); progressDialog.start(new TempOpenWithJob(new ProgressDialog(mainFrame, Translator.get("copy_dialog.copying")), mainFrame, selectedFiles, command)); } }</code><technical_language>this is true for keywords $f, $n, $p, $e, $b for $j (The path of directory muCommander started), perform action file is selected if $j keyword present</technical_language>

Target:
public void performAction() { FileSet selectedFiles; selectedFiles = mainFrame.getActiveTable().getSelectedFiles(); if(command.hasSelectedFileKeyword() && selectedFiles.size() == 0) return; if(selectedFiles.getBaseFolder().getURL().getScheme().equals(FileProtocols.FILE) && (selectedFiles.getBaseFolder().hasAncestor(LocalFile.class))) { try {ProcessRunner.execute(command.getTokens(selectedFiles), selectedFiles.getBaseFolder());} catch(Exception e) { InformationDialog.showErrorDialog(mainFrame); LOGGER.debug("Failed to execute command: " + command.getCommand(), e); } } else { ProgressDialog progressDialog = new ProgressDialog(mainFrame, Translator.get("copy_dialog.copying")); progressDialog.start(new TempOpenWithJob(new ProgressDialog(mainFrame, Translator.get("copy_dialog.copying")), mainFrame, selectedFiles, command)); } }
Source:
<code><START> public LoadChangeType getChangeType() { <END> return null; }</code><technical_language>this return something</technical_language>

Target:
public LoadChangeType getChangeType() { return LoadChangeType.attribute; }