auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testContainerIdAsAlias() throws Exception { Long oldPid = processClient.startProcess(CONTAINER_ALIAS, PROCESS_ID_EVALUATION); assertNotNull(oldPid); assertTrue(oldPid > 0); ProcessInstance processInstance = processClient.getProcessInstance(CONTAINER_ALIAS, oldPid); assertNotNull(processInstance); assertEquals(CONTAINER_ID, processInstance.getContainerId()); KieContainerResource containerResource = new KieContainerResource(CONTAINER_ID_101, releaseId101); containerResource.setContainerAlias(CONTAINER_ID); client.createContainer(CONTAINER_ID_101, containerResource); try { processClient.startProcess(CONTAINER_ID, PROCESS_ID_EVALUATION_2); fail("It shouldn't be possible to start this process"); } catch (KieServicesException ex) { assertTrue(ex.getMessage().contains("No process available with given id")); } oldPid = processClient.startProcess(CONTAINER_ID, PROCESS_ID_EVALUATION); assertNotNull(oldPid); assertTrue(oldPid > 0); processInstance = processClient.getProcessInstance(CONTAINER_ALIAS, oldPid); assertNotNull(processInstance); assertEquals(CONTAINER_ID, processInstance.getContainerId()); }

Target:
public void testContainerIdAsAlias() throws Exception { Long oldPid = processClient.startProcess(CONTAINER_ALIAS, PROCESS_ID_EVALUATION); assertThat(oldPid).isNotNull().isGreaterThan(0); ProcessInstance processInstance = processClient.getProcessInstance(CONTAINER_ALIAS, oldPid); assertThat(processInstance).isNotNull(); assertThat(processInstance.getContainerId()).isEqualTo(CONTAINER_ID); KieContainerResource containerResource = new KieContainerResource(CONTAINER_ID_101, releaseId101); containerResource.setContainerAlias(CONTAINER_ID); client.createContainer(CONTAINER_ID_101, containerResource); assertClientException(() -> processClient.startProcess(CONTAINER_ALIAS, PROCESS_ID_EVALUATION_2), 404, MessageFormat.format(PROCESS_DEFINITION_NOT_FOUND, PROCESS_ID_EVALUATION_2, CONTAINER_ALIAS), MessageFormat.format(NO_PROCESS_AVAILABLE_WITH_ID, PROCESS_ID_EVALUATION_2)); oldPid = processClient.startProcess(CONTAINER_ID, PROCESS_ID_EVALUATION); assertThat(oldPid).isNotNull().isGreaterThan(0); processInstance = processClient.getProcessInstance(CONTAINER_ALIAS, oldPid); assertThat(processInstance).isNotNull(); assertThat(processInstance.getContainerId()).isEqualTo(CONTAINER_ID); }
Source:
public void update(ViewerCell cell) { KeyValueFilter filter = filterObservable.getValue(); IResource resource = (IResource) cell.getElement(); Map<String, String> filteredLabels = ResourceUtils.getMatchingLabels(filter, resource); createCellLabel(filter, filteredLabels, cell); cell.getControl().redraw(); }

Target:
public void update(ViewerCell cell) { KeyValueFilter filter = filterObservable.getValue(); IResource resource = (IResource) cell.getElement(); Map<String, String> filteredLabels = ResourceUtils.getMatchingLabels(filter, resource); createCellLabel(filter, filteredLabels, cell); ((Table) cell.getControl()).getColumn(cell.getColumnIndex()).pack(); }
Source:
public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof Country) { return code.equals(((Country) obj).code); } return false; }

Target:
public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Country other = (Country) obj; return code.equals(other.code); }
Source:
private static ProgramState handleNumericalConstant(CheckerContext context, IdentifierTree syntaxNode) { ProgramState programState = context.getState(); Symbol identifier = syntaxNode.symbol(); if (!isNumericalConstant(identifier)) { return programState; } SymbolicValue constant = programState.getValue(identifier); if (constant == null) { return programState; } NumericalConstraint numericalConstraint = programState.getConstraint(constant, NumericalConstraint.class); Optional<Object> constantValue = ((JavaSymbol.VariableJavaSymbol) identifier).constantValue(); if (numericalConstraint == null && constantValue.isPresent()) { Object value = constantValue.get(); if (value instanceof Number) { return programState.addConstraint(constant, new NumericalConstraint((Number) value)); } } return programState; }

Target:
private static ProgramState handleNumericalConstant(CheckerContext context, IdentifierTree syntaxNode) { ProgramState programState = context.getState(); Symbol identifier = syntaxNode.symbol(); if (!isNumericalConstant(identifier)) { return programState; } SymbolicValue constant = programState.getValue(identifier); if (constant == null) { return programState; } NumericalConstraint numericalConstraint = programState.getConstraint(constant, NumericalConstraint.class); if (numericalConstraint == null) { return ((JavaSymbol.VariableJavaSymbol) identifier).constantValue() .filter(Number.class::isInstance) .map(Number.class::cast) .map(value -> programState.addConstraint(constant, new NumericalConstraint(value))) .orElse(programState); } return programState; }
Source:
private List<CRConfigurationProperty> configurationToCRConfiguration(Configuration config) { ArrayList<CRConfigurationProperty> properties = new ArrayList(); if (config != null) { for (ConfigurationProperty p : config) { CRConfigurationProperty crProp = new CRConfigurationProperty(p.getKey().getName()); if (p.getValue() != null) crProp.setValue(p.getValue()); else crProp.setEncryptedValue(p.getEncryptedValue()); properties.add(crProp); } } return properties; }

Target:
private List<CRConfigurationProperty> configurationToCRConfiguration(Configuration config) { ArrayList<CRConfigurationProperty> properties = new ArrayList(); if (config != null) { for (ConfigurationProperty p : config) { CRConfigurationProperty crProp = new CRConfigurationProperty(p.getKey().getName()); if (p.isSecure()) crProp.setEncryptedValue(p.getEncryptedValue()); else crProp.setValue(p.getValue()); properties.add(crProp); } } return properties; }
Source:
private static File getDefaultFile() { File home = new File(System.getProperty("user.home")); File netrc = new File(home, ".netrc"); if (netrc.exists()) return netrc; netrc = new File(home, "_netrc"); if (netrc.exists()) return netrc; return null; }

Target:
private static File getDefaultFile() { File home = FS.DETECTED.userHome(); File netrc = new File(home, ".netrc"); if (netrc.exists()) return netrc; netrc = new File(home, "_netrc"); if (netrc.exists()) return netrc; return null; }
Source:
public BrowserWebDriverContainer(DockerImageName dockerImageName) { super(dockerImageName); final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy() .withRegEx(".*(RemoteWebDriver instances should connect to|Selenium Server is up and running).*\n") .withStartupTimeout(Duration.of(15, SECONDS)); this.waitStrategy = new WaitAllStrategy() .withStrategy(logWaitStrategy) .withStrategy(new HostPortWaitStrategy()) .withStartupTimeout(Duration.of(15, SECONDS)); this.withRecordingFileFactory(new DefaultRecordingFileFactory()); }

Target:
public BrowserWebDriverContainer(DockerImageName dockerImageName) { super(dockerImageName); final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy() .withRegEx(".*(RemoteWebDriver instances should connect to|Selenium Server is up and running).*\n") .withStartupTimeout(Duration.of(15, SECONDS)); this.waitStrategy = new WaitAllStrategy() .withStrategy(logWaitStrategy) .withStrategy(new HostPortWaitStrategy()) .withStartupTimeout(Duration.of(15, SECONDS)); this.withRecordingFileFactory(new DefaultRecordingFileFactory()); this.customImageNameIsSet = true; recordingMode = VncRecordingMode.SKIP; }
Source:
public void aboutToBeShown() { super.aboutToBeShown(); getOnClickExpression().ifPresent(expression -> { this.hyperlinkListener = new EEFHyperlinkListener(this, this.text, this.container, this.controller); text.addMouseListener(hyperlinkListener); }); }

Target:
public void aboutToBeShown() { super.aboutToBeShown(); String onClickExpression = Optional.ofNullable(this.description.getOnClickExpression()).orElse(""); if (!onClickExpression.isEmpty()) { this.hyperlinkListener = new EEFHyperlinkListener(this, this.text, this.container, this.controller); text.addMouseListener(hyperlinkListener); } }
Source:
public double getBuyScale() { double scale = config.getDouble("buy-scale", BUYSCALE) ; if (scale < 0.0 || scale > 1000.0) scale = BUYSCALE ; return scale ; }

Target:
public double getBuyScale() { double scale = config.getDouble("worth-scale-factor.buy", BUYSCALE) ; if (scale < 0.0 || scale > 1000.0) scale = BUYSCALE ; return scale ; }
Source:
private void startKetchLeader(org.eclipse.jgit.transport.Daemon daemon) { KetchSystem system = new KetchSystem(); final KetchLeaderCache leaders = new KetchLeaderCache(system); final ReceivePackFactory<DaemonClient> factory; factory = daemon.getReceivePackFactory(); daemon.setReceivePackFactory(new ReceivePackFactory<DaemonClient>() { @Override public ReceivePack create(DaemonClient req, Repository repo) throws ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = factory.create(req, repo); KetchLeader leader; try { leader = leaders.get(null, repo); } catch (URISyntaxException err) { throw new ServiceNotEnabledException( KetchText.get().invalidFollowerUri, err); } rp.setPreReceiveHook(new KetchPreReceive(leader)); return rp; } }); }

Target:
private void startKetchLeader(org.eclipse.jgit.transport.Daemon daemon) { KetchSystem system = new KetchSystem(); final KetchLeaderCache leaders = new KetchLeaderCache(system); final ReceivePackFactory<DaemonClient> factory; factory = daemon.getReceivePackFactory(); daemon.setReceivePackFactory(new ReceivePackFactory<DaemonClient>() { @Override public ReceivePack create(DaemonClient req, Repository repo) throws ServiceNotEnabledException, ServiceNotAuthorizedException { ReceivePack rp = factory.create(req, repo); KetchLeader leader; try { leader = leaders.get(repo); } catch (URISyntaxException err) { throw new ServiceNotEnabledException( KetchText.get().invalidFollowerUri, err); } rp.setPreReceiveHook(new KetchPreReceive(leader)); return rp; } }); }
Source:
public static final <T> Observable<T> create(final T t) { OnSubscribe<T> onSubscribe = new OnSubscribe<T>() { @Override public void call(Subscriber<? super T> s) { s.onNext(t); if (!s.isUnsubscribed()) s.onCompleted(); } }; ScalarSynchronousObservable<T> o = new ScalarSynchronousObservable<T>(t, onSubscribe); if (o.onSubscribe == onSubscribe) { return o; } else { return Observable.create(onSubscribe); } }

Target:
public static final <T> Observable<T> create(final T t) { OnSubscribe<T> onSubscribe = new ScalarSynchronousOnSubscribe<T>(t); ScalarSynchronousObservable<T> o = new ScalarSynchronousObservable<T>(t, onSubscribe); if (o.onSubscribe instanceof ScalarSynchronousOnSubscribe) { return o; } else { return Observable.create(o.onSubscribe); } }
Source:
void showSource(Source source) { actionLabel.setText(action + ": " + source.toString()); sourceLabel.setText(source.getDescription()); reloadButton.setVisible(source instanceof Source.Aggregate); }

Target:
void showSource(Source source) { actionLabel.setText(action + ": " + source.toString()); sourceLabel.setText(source.getDescription()); reloadButton.setVisible(source.canBeReloaded() && showReloadButton); markReloadOperationCompleted(); }
Source:
@Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); srvs = new ArrayList<>(); for (int i = 0; i < SERVER_NODE_CNT; i++) srvs.add(grid(i)); System.out.println("CancelCommandCommandShTest.beforeTestsStarted"); IgniteCache<Object, Object> cache = client.getOrCreateCache( new CacheConfiguration<>(DEFAULT_CACHE_NAME).setIndexedTypes(Integer.class, Integer.class) .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)); awaitPartitionMapExchange(); for (int i = 0; i < PAGE_SZ * PAGE_SZ; i++) cache.put(i, i); }

Target:
@Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); srvs = new ArrayList<>(); for (int i = 0; i < SERVER_NODE_CNT; i++) srvs.add(grid(i)); IgniteCache<Object, Object> cache = client.getOrCreateCache( new CacheConfiguration<>(DEFAULT_CACHE_NAME).setIndexedTypes(Integer.class, Integer.class) .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)); awaitPartitionMapExchange(); for (int i = 0; i < PAGE_SZ * PAGE_SZ; i++) cache.put(i, i); }
Source:
public SplitPane(final AggregateConfigProvider manager, final Orientation orientation, final Component leftComponent, final Component rightComponent) { super(orientation == Orientation.HORIZONTAL ? HORIZONTAL_SPLIT : VERTICAL_SPLIT, true, leftComponent, rightComponent); setContinuousLayout(true); getActionMap().setParent(null); getActionMap().clear(); new ConfigBinder(manager).bind(this, SplitPane.class); }

Target:
public SplitPane(final AggregateConfigProvider manager, final Orientation orientation, final Component leftComponent, final Component rightComponent) { super(orientation == Orientation.HORIZONTAL ? HORIZONTAL_SPLIT : VERTICAL_SPLIT, true, leftComponent, rightComponent); setContinuousLayout(true); getActionMap().setParent(null); getActionMap().clear(); manager.getBinder().bind(this, SplitPane.class); }
Source:
public void ensureEmptyHypervisorIdsAreIgnored() throws Exception { Owner owner = new Owner("admin"); Map<String, ArrayList<GuestId>> hostGuestMap = new HashMap<String, ArrayList<GuestId>>(); hostGuestMap.put("", new ArrayList(Arrays.asList(new GuestId("GUEST_A"), new GuestId("GUEST_B")))); hostGuestMap.put("HYPERVISOR_A", new ArrayList(Arrays.asList(new GuestId("GUEST_C"), new GuestId("GUEST_D")))); when(ownerCurator.lookupByKey(eq(owner.getKey()))).thenReturn(owner); when(consumerCurator.getHostConsumersMap(any(Owner.class), any(Set.class))). thenReturn(new VirtConsumerMap()); when(consumerCurator.getGuestConsumersMap(any(Owner.class), any(Set.class))). thenReturn(new VirtConsumerMap()); when(ownerCurator.lookupByKey(eq(owner.getKey()))).thenReturn(owner); when(principal.canAccess(eq(owner), eq(SubResource.CONSUMERS), eq(Access.CREATE))). thenReturn(true); when(consumerTypeCurator.lookupByLabel( eq(ConsumerTypeEnum.HYPERVISOR.getLabel()))).thenReturn(hypervisorType); when(idCertService.generateIdentityCert(any(Consumer.class))) .thenReturn(new IdentityCertificate()); HypervisorCheckInResult result = null; try { result = hypervisorResource.hypervisorUpdate(hostGuestMap, principal, owner.getKey(), true); } catch (PersistenceException e) { fail("Expected no exception"); } assertTrue(result != null); assertTrue(result.getCreated().size() == 1); assertTrue(!result.getCreated().toArray(new Consumer[1])[0].getHypervisorId().equals("")); }

Target:
public void ensureEmptyHypervisorIdsAreIgnored() throws Exception { Owner owner = new Owner("admin"); Map<String, List<GuestId>> hostGuestMap = new HashMap<String, List<GuestId>>(); hostGuestMap.put("", new ArrayList(Arrays.asList(new GuestId("GUEST_A"), new GuestId("GUEST_B")))); hostGuestMap.put("HYPERVISOR_A", new ArrayList(Arrays.asList(new GuestId("GUEST_C"), new GuestId("GUEST_D")))); when(ownerCurator.lookupByKey(eq(owner.getKey()))).thenReturn(owner); when(consumerCurator.getHostConsumersMap(any(Owner.class), any(Set.class))) .thenReturn(new VirtConsumerMap()); when(consumerCurator.getGuestConsumersMap(any(Owner.class), any(Set.class))) .thenReturn(new VirtConsumerMap()); when(ownerCurator.lookupByKey(eq(owner.getKey()))).thenReturn(owner); when(principal.canAccess(eq(owner), eq(SubResource.CONSUMERS), eq(Access.CREATE))) .thenReturn(true); when(consumerTypeCurator.lookupByLabel(eq(ConsumerTypeEnum.HYPERVISOR.getLabel()))) .thenReturn(hypervisorType); when(idCertService.generateIdentityCert(any(Consumer.class))) .thenReturn(new IdentityCertificate()); HypervisorCheckInResult result = hypervisorResource.hypervisorUpdate( hostGuestMap, principal, owner.getKey(), true); assertNotNull(result); assertEquals(1, result.getCreated().size()); List<Consumer> created = new ArrayList<Consumer>(result.getCreated()); assertEquals("hypervisor_a", created.get(0).getHypervisorId().getHypervisorId()); }
Source:
private static void genComputeStats(StringBuilder rewrittenQueryBuilder, HiveConf conf, int pos, String columnName, TypeInfo typeInfo) throws SemanticException { Preconditions.checkArgument(typeInfo.getCategory() == Category.PRIMITIVE); ColumnStatsType columnStatsType = ColumnStatsType.getColumnStatsType((PrimitiveTypeInfo) typeInfo); int size = columnStatsType.getColumnStats().size() - 1; for (int i = 0; i < size; i++) { ColumnStatsField columnStatsField = columnStatsType.getColumnStats().get(i); appendStatsField(rewrittenQueryBuilder, conf, columnStatsField, columnStatsType, columnName, pos); rewrittenQueryBuilder.append(", "); } ColumnStatsField columnStatsField = columnStatsType.getColumnStats().get(size); appendStatsField(rewrittenQueryBuilder, conf, columnStatsField, columnStatsType, columnName, pos); }

Target:
private static void genComputeStats(StringBuilder rewrittenQueryBuilder, HiveConf conf, int pos, String columnName, TypeInfo typeInfo) throws SemanticException { Preconditions.checkArgument(typeInfo.getCategory() == Category.PRIMITIVE); ColumnStatsType columnStatsType = ColumnStatsType.getColumnStatsType((PrimitiveTypeInfo) typeInfo); for (int i = 0; i < columnStatsType.getColumnStats().size(); i++) { if (i > 0) { rewrittenQueryBuilder.append(", "); } ColumnStatsField columnStatsField = columnStatsType.getColumnStats().get(i); appendStatsField(rewrittenQueryBuilder, conf, columnStatsField, columnStatsType, columnName, pos); } }
Source:
private WechatJobErrorHandler getWechatJobErrorHandler() { for (JobErrorHandler jobErrorHandler : ServiceLoader.load(JobErrorHandler.class)) { if (null != jobErrorHandler && jobErrorHandler instanceof WechatJobErrorHandler) { return (WechatJobErrorHandler) jobErrorHandler; } } return new WechatJobErrorHandler(); }

Target:
private WechatJobErrorHandler getWechatJobErrorHandler() { for (JobErrorHandler each : ServiceLoader.load(JobErrorHandler.class)) { if (null != each && each instanceof WechatJobErrorHandler) { return (WechatJobErrorHandler) each; } } return new WechatJobErrorHandler(); }
Source:
public void addTraceMarker(ITmfTrace trace, long startTime, @ScriptParameter(defaultValue = DEFAULT_ENDTIME) long endTime, @ScriptParameter(defaultValue = DEFAULT_LABEL) @Nullable String label, @ScriptParameter(defaultValue = DEFAULT_CATEGORY) @Nullable String category, @ScriptParameter(defaultValue = DEFAULT_COLOR) @Nullable String color) throws Exception { if (fSource == null) { try { initializeScriptingMarkerSource(); } catch (NullPointerException e) { throw e; } } try { TraceMarker traceMarker = createTraceMarker(trace, label, category, startTime, endTime, color); if (fSource != null) { fSource.configureMarker(traceMarker); } } catch (IllegalArgumentException e) { String markerName = label == null ? DEFAULT_LABEL : label; String exceptionMessage = e + " for marker : " + markerName + " at " + startTime; throw new IllegalArgumentException(exceptionMessage); } }

Target:
public void addTraceMarker(ITmfTrace trace, long startTime, @ScriptParameter(defaultValue = DEFAULT_ENDTIME) long endTime, @ScriptParameter(defaultValue = DEFAULT_LABEL) @Nullable String label, @ScriptParameter(defaultValue = DEFAULT_CATEGORY) @Nullable String category, @ScriptParameter(defaultValue = DEFAULT_COLOR) @Nullable String color) throws NullPointerException, IllegalArgumentException { ScriptingMarkerSource source = getMarkerSource(trace); if (source == null) { try { source = findMarkerSourceFromAdapters(trace); if (source == null) { source = createMarkerSource(trace); } } catch (NullPointerException e) { throw new NullPointerException(INVALID_TRACE); } } try { TraceMarker traceMarker = createTraceMarker(trace, label, category, startTime, endTime, color); source.configureMarker(traceMarker); } catch (IllegalArgumentException e) { String markerName = label == null ? DEFAULT_LABEL : label; String exceptionMessage = e + " for marker : " + markerName + " at " + startTime; throw new IllegalArgumentException(exceptionMessage); } }
Source:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Realm.init(getApplicationContext()); setContentView(R.layout.activity_realm_migration_example); rootLayout = ((LinearLayout) findViewById(R.id.container)); rootLayout.removeAllViews(); copyBundledRealmFile(this.getResources().openRawResource(R.raw.default0), "default0"); copyBundledRealmFile(this.getResources().openRawResource(R.raw.default1), "default1"); copyBundledRealmFile(this.getResources().openRawResource(R.raw.default2), "default2"); RealmConfiguration config0 = new RealmConfiguration.Builder() .name("default0") .schemaVersion(3) .build(); try { Realm.migrateRealm(config0, new Migration()); } catch (FileNotFoundException ignored) { } realm = Realm.getInstance(config0); showStatus("Default0"); showStatus(realm); realm.close(); RealmConfiguration config1 = new RealmConfiguration.Builder() .name("default1") .schemaVersion(3) .migration(new Migration()) .build(); realm = Realm.getInstance(config1); showStatus("Default1"); showStatus(realm); realm.close(); RealmConfiguration config2 = new RealmConfiguration.Builder() .name("default2") .schemaVersion(3) .deleteRealmIfMigrationNeeded() .build(); realm = Realm.getInstance(config2); showStatus("default2"); showStatus(realm); realm.close(); }

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_realm_migration_example); rootLayout = ((LinearLayout) findViewById(R.id.container)); rootLayout.removeAllViews(); copyBundledRealmFile(this.getResources().openRawResource(R.raw.default0), "default0.realm"); copyBundledRealmFile(this.getResources().openRawResource(R.raw.default1), "default1.realm"); copyBundledRealmFile(this.getResources().openRawResource(R.raw.default2), "default2.realm"); RealmConfiguration config0 = new RealmConfiguration.Builder() .name("default0.realm") .schemaVersion(3) .build(); try { Realm.migrateRealm(config0, new Migration()); } catch (FileNotFoundException ignored) { } realm = Realm.getInstance(config0); showStatus("Default0"); showStatus(realm); realm.close(); RealmConfiguration config1 = new RealmConfiguration.Builder() .name("default1.realm") .schemaVersion(3) .migration(new Migration()) .build(); realm = Realm.getInstance(config1); showStatus("Default1"); showStatus(realm); realm.close(); RealmConfiguration config2 = new RealmConfiguration.Builder() .name("default2.realm") .schemaVersion(3) .deleteRealmIfMigrationNeeded() .build(); realm = Realm.getInstance(config2); showStatus("default2"); showStatus(realm); realm.close(); }
Source:
public URL getDirectoryUrl() { String directoryURLString = String.format("%s/%s/%s", azureFileStorageClient.getUrl(), shareName, directoryPath); if (snapshot != null) { directoryURLString = String.format("%s?snapshot=%s", directoryURLString, snapshot); } try { return new URL(directoryURLString); } catch (MalformedURLException e) { throw logger.logExceptionAsError(new RuntimeException( String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), directoryURLString), e)); } }

Target:
public URL getDirectoryUrl() { StringBuilder directoryURLString = new StringBuilder(azureFileStorageClient.getUrl()).append("/") .append(shareName).append("/").append(directoryPath); if (snapshot != null) { directoryURLString.append("?snapshot=").append(snapshot); } try { return new URL(directoryURLString.toString()); } catch (MalformedURLException e) { throw logger.logExceptionAsError(new RuntimeException( String.format("Invalid URL on %s: %s" + getClass().getSimpleName(), directoryURLString), e)); } }
Source:
static private String handleParens(String group, String prefix, String suffix) { int numOpenParens = numOccurencesOfCharIn(group, '('); int numCloseParens = numOccurencesOfCharIn(group, ')'); if (numOpenParens >= numCloseParens || suffix.isEmpty()) { return (prefix + group + suffix); } else { int index; if (numOpenParens == 0) { index = indexOfNthOccurrenceOfCharIn(group, ')', 1) - 1; } else { index = indexOfNthOccurrenceOfCharIn(group, ')', numOpenParens); } return (prefix + group.substring(0, index+1) + suffix + group.substring(index+1)); } }

Target:
static private String handleParens(String group, String prefix, String suffix) { int numOpenParens = numOccurencesOfCharIn(group, '('); int numCloseParens = numOccurencesOfCharIn(group, ')'); if (numOpenParens >= numCloseParens || suffix.isEmpty()) { return (prefix + group + suffix); } else { int index; if (numOpenParens == 0) { index = indexOfNthOccurrenceOfCharIn(group, ')', 1); } else { index = indexOfNthOccurrenceOfCharIn(group, ')', numOpenParens) + 1; } return (prefix + group.substring(0, index) + suffix + group.substring(index)); } }
Source:
public void instagramProfileScraperUserTest() { InstagramProfileScraper instagramScraper = new InstagramProfileScraper(); String url = "<LINK_0>"; BufferedReader br = null; try { ClientConnection connection = new ClientConnection(url); assertThat(connection.getStatusCode(), is(200)); System.out.println("saurabh well done connected"); br = instagramScraper.getHtml(connection); } catch (IOException e) { DAO.log("InstagramProfileScraperTest.instagramProfileScraperUserTest() failed to connect to network. url:" + url); } JSONArray instaProfile = new JSONArray(); instaProfile = instagramScraper.scrapeInstagram(br, url); assertNotNull(instaProfile); }

Target:
public void instagramProfileScraperUserTest() { InstagramProfileScraper instagramScraper = new InstagramProfileScraper(); String url = "<LINK_0>"; BufferedReader br = null; try { ClientConnection connection = new ClientConnection(url); assertThat(connection.getStatusCode(), is(200)); br = instagramScraper.getHtml(connection); } catch (IOException e) { DAO.log("InstagramProfileScraperTest.instagramProfileScraperUserTest() failed to connect to network. url:" + url); } JSONArray instaProfile = new JSONArray(); instaProfile = instagramScraper.scrapeInstagram(br, url); String hostname = "www.instagram.com"; for(int i=0; i<instaProfile.length(); i++) { JSONObject json = (JSONObject)instaProfile.get(i); JSONObject entry_data = json.getJSONObject("entry_data"); JSONObject config = json.getJSONObject("config"); try { assertNotNull(config); assertNotNull(instaProfile); assertNotNull(entry_data); assertTrue(json.has("activity_counts")); assertTrue(json.has("country_code")); assertTrue(json.has("platform")); assertTrue(json.has("language_code")); assertTrue(json.has("gatekeepers")); assertTrue(entry_data.has("ProfilePage")); assertTrue(config.has("viewer")); assertTrue(config.has("csrf_token")); assertEquals(json.getString("hostname"), hostname); } catch (Exception e) { DAO.log("InstagramProfileScraperTest.instagramProfileScraperUserTest() assert error"); } } }
Source:
public CompletableFuture<Boolean> thenPut(Put put) { validatePut(put, conn.connConf.getMaxKeyValueSize()); preCheck(); return checkAndMutate(CheckAndMutate.newBuilder(row) .ifMatches(family, qualifier, op, value) .timeRange(timeRange) .build(put)); }

Target:
public CompletableFuture<Boolean> thenPut(Put put) { validatePut(put, conn.connConf.getMaxKeyValueSize()); preCheck(); return RawAsyncTableImpl.this.<Boolean> newCaller(row, put.getPriority(), rpcTimeoutNs) .action((controller, loc, stub) -> RawAsyncTableImpl.mutate(controller, loc, stub, put, (rn, p) -> RequestConverter.buildMutateRequest(rn, row, family, qualifier, op, value, null, timeRange, p), (c, r) -> r.getProcessed())) .call(); }
Source:
public static String asFileName(String urlString) throws MalformedURLException { URL url = new URL(urlString); String joined = StringUtils.join(new String[] { url.getProtocol(), url.getHost(), url.getPath() }, '-'); return StringUtils.replaceChars(joined, '/', '-'); }

Target:
public static String asFileName(String urlString) throws MalformedURLException { URL url = new URL(urlString); return url.getProtocol() + "-" + url.getHost() + "-" + url.getPath().replaceAll("/", "-"); }
Source:
protected ResponseBuilder createBadRequestResponse(Set<ConstraintViolation<?>> violations) { final Map<String, String> responseObj = new HashMap<>(); violations.forEach(violation -> { responseObj.put(violation.getPropertyPath().toString(), violation.getMessage()); }); return Response.status(Response.Status.BAD_REQUEST) .entity(responseObj); }

Target:
protected ResponseBuilder createBadRequestResponse(Set<ConstraintViolation<?>> violations) { final Map<String, String> responseObj = violations.stream() .collect(Collectors.toMap(v -> v.getPropertyPath().toString(), ConstraintViolation::getMessage)); return Response.status(Response.Status.BAD_REQUEST) .entity(responseObj); }
Source:
public void enableDebugLogging(boolean enable) { checkNotDisposed(); }

Target:
public void enableDebugLogging(boolean enable) { checkNotDisposed(); mDebugLog = enable; }
Source:
public boolean equals(Object obj) { if (obj == null || !(obj instanceof SerializableScan)) { return false; } SerializableScan other = (SerializableScan) obj; try { return toEncodedString().equals(other.toEncodedString()); } catch (IOException e) { throw new RuntimeException("Could not check SerializableScan equality", e); } }

Target:
public boolean equals(Object obj) { if (!(obj instanceof SerializableScan)) { return false; } SerializableScan other = (SerializableScan) obj; try { return toEncodedString().equals(other.toEncodedString()); } catch (IOException e) { throw new RuntimeException("Could not check SerializableScan equality", e); } }
Source:
void checkRegion(Configured configuration, PluginExceptionConditionAccumulator accumulator, LocalizationContext localizationContext) { String regionName = configuration.getConfigurationValue(REGION_SQL, localizationContext); LOG.info(">> Querying region '{}'", regionName); SQLAdmin sqlAdmin = credentials.getSQLAdmin(); String projectId = credentials.getProjectId(); try { List<Tier> tierList = sqlAdmin.tiers().list(projectId).execute().getItems(); boolean isRegionValid = false; for (Tier tier : tierList) { if (tier.getRegion().contains(regionName)) { return; } } addError(accumulator, REGION_SQL, localizationContext, null, REGION_NOT_FOUND_MSG, regionName, projectId); } catch (IOException e) { throw new TransientProviderException(e); } }

Target:
void checkRegion(Configured configuration, PluginExceptionConditionAccumulator accumulator, LocalizationContext localizationContext) { String regionName = configuration.getConfigurationValue(REGION_SQL, localizationContext); LOG.info(">> Querying region '{}'", regionName); SQLAdmin sqlAdmin = credentials.getSQLAdmin(); String projectId = credentials.getProjectId(); try { List<Tier> tierList = sqlAdmin.tiers().list(projectId).execute().getItems(); if (tierList != null) { for (Tier tier : tierList) { if (tier.getRegion().contains(regionName)) { return; } } } addError(accumulator, REGION_SQL, localizationContext, null, REGION_NOT_FOUND_MSG, regionName, projectId); } catch (IOException e) { throw new TransientProviderException(e); } }
Source:
protected Map<String, String> getExclusiveLocks() { Map<String, String> locks = new HashMap<String, String>(); locks.putAll(super.getExclusiveLocks()); locks.put(getVmTemplateId().toString(), LockingGroup.TEMPLATE.name()); return locks; }

Target:
protected Map<String, String> getExclusiveLocks() { Map<String, String> locks = new HashMap<String, String>(); Map<String, String> parentLocks = super.getExclusiveLocks(); if (parentLocks != null) { locks.putAll(parentLocks); } locks.put(getVmTemplateId().toString(), LockingGroup.TEMPLATE.name()); return locks; }
Source:
public void configure(Binder binder) { }

Target:
public void configure(Binder binder) { binder.bind( new TypeLiteral<SeekableStreamIndexTaskClientFactory<KinesisIndexTaskClient>>() { } ).to(KinesisIndexTaskClientFactory.class).in(LazySingleton.class); JsonConfigProvider.bind(binder, "druid.kinesis", AWSCredentialsConfig.class, Names.named("kinesis")); }
Source:
public void update() throws BankException, LoginException, BankChoiceException, IOException { super.update(); if (username == null || password == null || username.length() == 0 || password.length() == 0) { throw new LoginException(res.getText(R.string.invalid_username_password).toString()); } urlopen = login(); Matcher matcher; try { matcher = reAccountsUrl.matcher(response); if (!matcher.find()) { throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url."); } String strAccountsUrl = "<LINK_0>"+matcher.group(1); response = urlopen.open(strAccountsUrl); matcher = reBalance.matcher(response); Integer accountId = 0; while (matcher.find()) { accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString())); balance = balance.add(Helpers.parseBalance(matcher.group(3))); accountIds.add(matcher.group(1)); accountId += 1; } if (accounts.isEmpty()) { throw new BankException(res.getText(R.string.no_accounts_found).toString()); } } finally { super.updateComplete(); } }

Target:
public void update() throws BankException, LoginException, BankChoiceException, IOException { super.update(); if (username == null || password == null || username.length() == 0 || password.length() == 0) { throw new LoginException(res.getText(R.string.invalid_username_password).toString()); } urlopen = login(); Matcher matcher = reAccountsUrl.matcher(response); if (!matcher.find()) { throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url."); } String strAccountsUrl = "<LINK_0>"+matcher.group(1); response = urlopen.open(strAccountsUrl); matcher = reBalance.matcher(response); Integer accountId = 0; while (matcher.find()) { accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString())); balance = balance.add(Helpers.parseBalance(matcher.group(3))); accountIds.add(matcher.group(1)); accountId += 1; } if (accounts.isEmpty()) { throw new BankException(res.getText(R.string.no_accounts_found).toString()); } super.updateComplete(); }
Source:
private void saveTslintError(SensorContext context, TslintError tslintError) { String tslintKey = tslintError.ruleName; InputFile inputFile = getInputFile(context, tslintError.name); if (inputFile == null) { return; } TextRange location = getLocation(tslintError, inputFile); RuleType ruleType = TslintRulesDefinition.ruleType(tslintKey); LOG.debug("External issue, file:\"{}\", id:{}, message:\"{}\", location:{}, type: {}", tslintError.name, tslintKey, tslintError.failure, location, ruleType); NewExternalIssue newExternalIssue = context.newExternalIssue(); NewIssueLocation primaryLocation = newExternalIssue.newLocation() .message(tslintError.failure) .on(inputFile) .at(location); newExternalIssue .at(primaryLocation) .engineId(TslintRulesDefinition.REPOSITORY_KEY) .ruleId(tslintKey) .type(ruleType) .severity(DEFAULT_SEVERITY) .remediationEffortMinutes(DEFAULT_REMEDIATION_COST) .save(); }

Target:
private void saveTslintError(SensorContext context, TslintError tslintError) { String tslintKey = tslintError.ruleName; InputFile inputFile = getInputFile(context, tslintError.name); if (inputFile == null) { return; } TextRange location = getLocation(tslintError, inputFile); TextPointer start = location.start(); RuleType ruleType = TslintRulesDefinition.ruleType(tslintKey); LOG.debug("Saving external TSLint issue { file:\"{}\", id:{}, message:\"{}\", line:{}, offset:{}, type: }", tslintError.name, tslintKey, tslintError.failure, start.line(), start.lineOffset(), ruleType); NewExternalIssue newExternalIssue = context.newExternalIssue(); NewIssueLocation primaryLocation = newExternalIssue.newLocation() .message(tslintError.failure) .on(inputFile) .at(location); newExternalIssue .at(primaryLocation) .engineId(TslintRulesDefinition.REPOSITORY_KEY) .ruleId(tslintKey) .type(ruleType) .severity(DEFAULT_SEVERITY) .remediationEffortMinutes(DEFAULT_REMEDIATION_COST) .save(); }
Source:
public Object getValueAt(final int rowIndex, final int columnIndex) { if (_sequence == null) return null; if (_sequence.size() == 0) return null; final Config config = _sequence.getStep(rowIndex); final ItemKey key = _iteratedKeys[columnIndex]; if (!isGcal(config) && "calibration".equals(key.getParent().toString())) return ""; Object val = config.getItemValue(key); if (OBS_CLASS_KEY.equals(key)) { String classStr = (String) val; val = (classStr == null) ? null : ObsClass.parseType(classStr); } return val; }

Target:
public Object getValueAt(final int rowIndex, final int columnIndex) { if (_sequence == null) return null; if (_sequence.size() == 0) return null; final Config config = _sequence.getStep(rowIndex); final ItemKey key = _iteratedKeys[columnIndex]; if (key.getParent() == null) return null; if (!isGcal(config) && "calibration".equals(key.getParent().toString())) return ""; Object val = config.getItemValue(key); if (OBS_CLASS_KEY.equals(key)) { String classStr = (String) val; val = (classStr == null) ? null : ObsClass.parseType(classStr); } return val; }
Source:
protected void autonomousMain() throws AutonomousModeOverException, InterruptedException { Clamp.mode.set(Clamp.MODE_HEIGHT); Clamp.height.set(startHeight.get()); waitUntil(Clamp.atDesiredHeight); Clamp.openControl.set(true); Clamp.height.set(0.0f); waitUntil(Clamp.atDesiredHeight); Clamp.openControl.set(false); Clamp.height.set(endHeight.get()); running.set(false); }

Target:
protected void autonomousMain() throws AutonomousModeOverException, InterruptedException { boolean running = Rollers.running.get(); try { Rollers.running.set(false); if (useRollers.get()) { Rollers.overrideRollers.set(true); Rollers.leftPneumaticOverride.set(true); Rollers.rightPneumaticOverride.set(true); Rollers.leftRollerOverride.set(-1.0f); Rollers.rightRollerOverride.set(-1.0f); } Clamp.mode.set(Clamp.MODE_HEIGHT); Clamp.height.set(startHeight.get()); waitUntil(Clamp.atDesiredHeight); atDrop.event(); if (useRollers.get()) { Rollers.overrideRollers.set(false); } Clamp.open.set(true); waitForTime(clampTime); Clamp.height.set(collectHeight.get()); waitUntil(Clamp.atBottom); Clamp.open.set(false); waitForTime(clampTime); Clamp.height.set(endHeight.get()); this.running.set(false); } finally { Rollers.running.set(running); } }
Source:
protected Component deserializeItem(JsonElement src, JsonDeserializationContext context) { return ListDelegate.deserializeComponent(src, context); }

Target:
protected Component deserializeItem(JsonElement src, JsonDeserializationContext context) { return deserializeComponent(src, context); }
Source:
@Ignore @Test public void annotatedNestedType() { TypeName type = TypeName.get(Map.Entry.class).annotated(TYPE_USE_ANNOTATION); assertThat(type.toString()).isEqualTo("java.util.Map.@" + TUA + " Entry"); }

Target:
@Test public void annotatedNestedType() { TypeName type = TypeName.get(Map.Entry.class).annotated(TYPE_USE_ANNOTATION); assertThat(type.toString()).isEqualTo("java.util.Map. @" + TUA + " Entry"); }
Source:
private static void applyFrameBoundsHeuristics(FrameDesc a, FrameDesc b) { int end = a.getEnd(), start = b.getStart(); if (end != -1 && start != -1) { return; } long tsDiff = (b.getTimestamp() - a.getTimestamp()) & 0xFFFFFFFFL; if (tsDiff > (1L << 30) && tsDiff < (-(1L << 30) & 0xFFFFFFFFL)) { return; } int min = b.getMinSeen(), max = a.getMaxSeen(); int snDiff = (max - min) & 0xFFFF; if (start != -1 || end != -1) { if (snDiff < 3 || snDiff > (-3 & 0xFFFF)) { if (end == -1) { a.setEnd((max + 1) & 0xFFFF); } if (start == -1) { b.setStart((min - 1) & 0xFFFF); } } } else { if (snDiff < 4 || snDiff > (-4 & 0xFFFF)) { a.setEnd((max + 1) & 0xFFFF); b.setStart((min - 1) & 0xFFFF); } } }

Target:
private static void applyFrameBoundsHeuristics(FrameDesc a, FrameDesc b) { int end = a.getEnd(), start = b.getStart(); if (end != -1 && start != -1) { return; } long tsDiff = (b.getTimestamp() - a.getTimestamp()) & 0xFFFFFFFFL; if (tsDiff > (1L << 30) && tsDiff < (-(1L << 30) & 0xFFFFFFFFL)) { return; } else if (tsDiff >= (-(1L << 30) & 0xFFFFFFFFL)) { logger.warn("Frames that are out of order detected."); } else { int min = b.getMinSeen(), max = a.getMaxSeen(); int snDiff = (max - min) & 0xFFFF; if (start != -1 || end != -1) { if (snDiff == 2) { if (end == -1) { a.setEnd((max + 1) & 0xFFFF); } else { b.setStart((min - 1) & 0xFFFF); } } else if (snDiff < 2 || snDiff > (-3 & 0xFFFF)) { logger.warn("Frame corruption or packets that are out of " + "order detected."); } } else { if (snDiff == 3) { a.setEnd((max + 1) & 0xFFFF); b.setStart((min - 1) & 0xFFFF); } else if (snDiff < 3 || snDiff > (-4 & 0xFFFF)) { logger.warn("Frame corruption or packets that are out of" + " order detected."); } } } }
Source:
default String getId() { return getStateTypeName(); }

Target:
default String getId() { return getClass().getCanonicalName(); }
Source:
public int compareTo(@NonNull final NewVersionAvailableEvent another) { int result = BooleanUtils.compare(isUnsupported, another.isUnsupported); if (result == 0) { result = 0 - ObjectUtils.compare(lastSupportedDate, another.lastSupportedDate, true); if (result == 0) { result = ObjectUtils.compare(newVersion, another.newVersion); } } return result; }

Target:
public int compareTo(@NonNull final NewVersionAvailableEvent another) { int result; if (isUnsupported != another.isUnsupported) { result = isUnsupported ? 1 : -1; } else { if (lastSupportedDate == another.lastSupportedDate) { result = 0; } else if (lastSupportedDate == null) { result = -1; } else if (another.lastSupportedDate == null) { result = 1; } else { result = another.lastSupportedDate.compareTo(lastSupportedDate); } if (result == 0) { if (newVersion == another.newVersion) { result = 0; } else if (newVersion == null) { result = -1; } else if (another.newVersion == null) { result = 1; } else { result = newVersion.compareTo(another.newVersion); } } } return result; }
Source:
private void process(final DuplicateSet set) { final List<SAMRecord> records = set.getRecords(); for(SAMRecord rec : records) { if(rec.getStringAttribute(umiTag) == null) { nextSetsIterator = Collections.singleton(set).iterator(); return; } } Map<String, Long> umiFrequencies = records.stream() .collect(Collectors.groupingBy(p -> p.getStringAttribute(umiTag), counting())); UmiGraph umiGraph = new UmiGraph(); int firstGroup = 0; for (Map.Entry<String, Long> umiFrequency : umiFrequencies.entrySet()) { umiGraph.addNode(new UmiSequence(umiFrequency.getKey(), umiFrequency.getValue())); } umiGraph.processNodes(); Map<Integer, List<UmiSequence>> umisByDuplicateSet = umiGraph.getUmisByDuplicateSet(); List<DuplicateSet> duplicateSetList = new ArrayList<>(); for(int i = 0;i < umiGraph.duplicateSetCounter;i++) { DuplicateSet e = new DuplicateSet(); duplicateSetList.add(e); } for(SAMRecord rec : records) { String umi = records.get(records.indexOf(rec)).getStringAttribute(umiTag); int recordGroup = umiGraph.node.get(umi).duplicateSet; duplicateSetList.get(recordGroup).add(records.get(records.indexOf(rec))); } if(addInferredUmi) { for(DuplicateSet ds : duplicateSetList) { List<SAMRecord> recordsFromDuplicateSet = ds.getRecords(); for(SAMRecord record : recordsFromDuplicateSet) { record.setAttribute(inferredUmiTag, umiGraph.getInferredUmiFromOriginalSequence(record.getStringAttribute(umiTag))); } } } nextSetsIterator = duplicateSetList.iterator(); }

Target:
private void process(final DuplicateSet set) { if (nextSetsIterator.hasNext()) { throw new PicardException("nextSetsIterator is expected to be empty, but already contains data."); } final UmiGraph umiGraph = new UmiGraph(set, umiTag, inferredUmiTag, allowMissingUmis); nextSetsIterator = umiGraph.joinUmisIntoDuplicateSets(maxEditDistanceToJoin).iterator(); }
Source:
public Response delete(@PathParam("tenant") String tenant) { LOGGER.debug("Deleting all the resources for [" + tenant + "]"); dao.deleteFromTenant(tenant); return Response.status(204).build(); }

Target:
public Response delete(@PathParam("tenant") String tenant) { LOGGER.debug("Deleting all the resources for [{}]", tenant); dao.deleteFromTenant(tenant); return Response.status(204).build(); }
Source:
private boolean hasFunctionnalNavigationTool() { boolean hasFunctionnalNavigationTool = false; if (session.isOpen()) { IInterpreter interpreter = session.getInterpreter(); for (RepresentationNavigationDescription representationNavigationDes : dDiagramElement.getMapping().getNavigationDescriptions()) { boolean isActiveRepresentationNavigationDes = session.getSelectedViewpoints(false).contains(representationNavigationDes.getRepresentationDescription().eContainer()); if (isActiveRepresentationNavigationDes) { boolean precondition = true; if (!StringUtil.isEmpty(representationNavigationDes.getPrecondition())) { try { interpreter.setVariable(representationNavigationDes.getContainerVariable().getName(), semanticElement); interpreter.setVariable(representationNavigationDes.getContainerViewVariable().getName(), dDiagramElement); precondition = interpreter.evaluateBoolean(semanticElement, representationNavigationDes.getPrecondition()); } catch (EvaluationException e) { RuntimeLoggerManager.INSTANCE.error(representationNavigationDes, ToolPackage.eINSTANCE.getAbstractToolDescription_Precondition(), e); } finally { interpreter.unSetVariable(representationNavigationDes.getContainerVariable().getName()); interpreter.unSetVariable(representationNavigationDes.getContainerViewVariable().getName()); } } if (precondition) { if (checkRepresentationNavigationDescription(interpreter, representationNavigationDes, dDiagramElement)) { return true; } } } } } return hasFunctionnalNavigationTool; }

Target:
private boolean hasFunctionnalNavigationTool() { boolean hasFunctionnalNavigationTool = false; if (session.isOpen()) { IInterpreter interpreter = session.getInterpreter(); Collection<Viewpoint> selectedViewpoints = session.getSelectedViewpoints(false); for (RepresentationNavigationDescription representationNavigationDes : dDiagramElement.getMapping().getNavigationDescriptions()) { boolean isActiveRepresentationNavigationDes = selectedViewpoints.contains(representationNavigationDes.getRepresentationDescription().eContainer()); if (isActiveRepresentationNavigationDes) { boolean precondition = true; if (!StringUtil.isEmpty(representationNavigationDes.getPrecondition())) { try { interpreter.setVariable(representationNavigationDes.getContainerVariable().getName(), semanticElement); interpreter.setVariable(representationNavigationDes.getContainerViewVariable().getName(), dDiagramElement); precondition = interpreter.evaluateBoolean(semanticElement, representationNavigationDes.getPrecondition()); } catch (EvaluationException e) { RuntimeLoggerManager.INSTANCE.error(representationNavigationDes, ToolPackage.eINSTANCE.getAbstractToolDescription_Precondition(), e); } finally { interpreter.unSetVariable(representationNavigationDes.getContainerVariable().getName()); interpreter.unSetVariable(representationNavigationDes.getContainerViewVariable().getName()); } } if (precondition && checkRepresentationNavigationDescription(interpreter, representationNavigationDes, dDiagramElement)) { return true; } } } } return hasFunctionnalNavigationTool; }