auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void init(Notifier input) { final boolean wasInitializing = initializing; initializing = true; try { this.input = input; validationChangeListener = new ValidationChangeListener(input); TreeIterator<Object> allContents; if (ResourceSet.class.isInstance(input)) { allContents = EcoreUtil.getAllContents(ResourceSet.class.cast(input), false); } else if (Resource.class.isInstance(input)) { allContents = EcoreUtil.getAllContents(Resource.class.cast(input), false); } else if (EObject.class.isInstance(input)) { allContents = EcoreUtil.getAllContents(EObject.class.cast(input), false); } else { return; } <START> if (EObject.class.isInstance(input)) { <END> updateCacheWithoutRefresh(EObject.class.cast(input), this); } while (allContents.hasNext()) { final Object next = allContents.next(); if (!EObject.class.isInstance(next)) { continue; } updateCacheWithoutRefresh(EObject.class.cast(next), this); } } finally { initializing = wasInitializing; } }</code><technical_language>Ah, right, 'allContents' overlooked root element. usual pattern for is EcoreUtil.getAllContents(Collections.singleton(eObject), false)</technical_language>

Target:
private void init(Notifier input) { final boolean wasInitializing = initializing; initializing = true; try { this.input = input; validationChangeListener = new ValidationChangeListener(input); TreeIterator<Object> allContents; if (ResourceSet.class.isInstance(input)) { allContents = EcoreUtil.getAllContents(ResourceSet.class.cast(input), false); } else if (Resource.class.isInstance(input)) { allContents = EcoreUtil.getAllContents(Resource.class.cast(input), false); } else if (EObject.class.isInstance(input)) { allContents = EcoreUtil.getAllContents(Collections.singleton(EObject.class.cast(input)), false); } else { return; } while (allContents.hasNext()) { final Object next = allContents.next(); if (!EObject.class.isInstance(next)) { continue; } updateCacheWithoutRefresh(EObject.class.cast(next), this); } } finally { initializing = wasInitializing; } }
Source:
<code>public void testAdvanceTest0004() throws Exception { String reqResNo; Set<String> policies = new HashSet<String>(); policies.add("TestPolicy_0004.xml"); log.info("Advance Test 0004 is started. This test is for Jira <LINK_0>"); <START> for (int i = 1; i < 2; i++) { <END> if (i < 10) { reqResNo = "0" + i; } else { reqResNo = Integer.toString(i); } String request = TestUtil.createRequest(ROOT_DIRECTORY, VERSION_DIRECTORY, "request_0004_" + reqResNo + ".xml"); if (request != null) { log.info("Request that is sent to the PDP : " + request); ResponseCtx response = TestUtil.evaluate(getPDPNewInstance(policies), request); if (response != null) { log.info("Response that is received from the PDP : " + response.encode()); ResponseCtx expectedResponseCtx = TestUtil.createResponse(ROOT_DIRECTORY, VERSION_DIRECTORY, "response_0004_" + reqResNo + ".xml"); validate(response); if (expectedResponseCtx != null) { assertTrue(TestUtil.isMatching(response, expectedResponseCtx)); } else { assertTrue("Response read from file is Null", false); } } else { assertFalse("Response received PDP is Null", false); } } else { assertTrue("Request read from file is Null", false); } log.info("Advance Test 0004 is finished"); } }</code><technical_language>remove this for loop straightaway pass complete filename TestUtil.createRequest</technical_language>

Target:
public void testAdvanceTest0004() throws Exception { String reqResNo; Set<String> policies = new HashSet<String>(); policies.add("TestPolicy_0004.xml"); log.info("Advance Test 0004 is started. This test is for Jira <LINK_0>"); String request = TestUtil.createRequest(ROOT_DIRECTORY, VERSION_DIRECTORY, "request_0004_01.xml"); if (request != null) { log.info("Request that is sent to the PDP : " + request); ResponseCtx response = TestUtil.evaluate(getPDPNewInstance(policies), request); if (response != null) { log.info("Response that is received from the PDP : " + response.encode()); ResponseCtx expectedResponseCtx = TestUtil.createResponse(ROOT_DIRECTORY, VERSION_DIRECTORY, "response_0004_01.xml"); validate(response); if (expectedResponseCtx != null) { assertTrue(TestUtil.isMatching(response, expectedResponseCtx)); } else { assertTrue("Response read from file is Null", false); } } else { assertFalse("Response received PDP is Null", false); } } else { assertTrue("Request read from file is Null", false); } log.info("Advance Test 0004 is finished"); }
Source:
<code>public void logChange(final String storeName, final Bytes key, final byte[] value, final long timestamp) { <START> recordCollector().send( <END> storeName + "-changelog", key, value, null, taskId().partition, timestamp, KEY_SERIALIZER, VALUE_SERIALIZER); }</code><technical_language>merge InternalMock MockInternal this okay? cc @cadonna</technical_language>

Target:
public void logChange(final String storeName, final Bytes key, final byte[] value, final long timestamp) { recordCollector().send( storeName + "-changelog", key, value, null, taskId().partition, timestamp, BYTES_KEY_SERIALIZER, BYTEARRAY_VALUE_SERIALIZER); }
Source:
<code>public void testSeekToReadaheadExactlyAndRead() throws Throwable { <START> describe("Seek to readahead limit and call InputStream.read(byte[])"); <END> Path path = path("testSeekToReadaheadExactlyAndRead"); FileSystem fs = getFileSystem(); writeTestDataset(path); try (FSDataInputStream in = fs.open(path)) { readAtEndAndReturn(in); final byte[] temp = new byte[5]; int offset = READAHEAD; in.seek(offset); int l = in.read(temp); LOG.info("Read of byte array at offset returned bytes", offset, l); assertTrue("Reading in temp data", l > 0); assertDatasetEquals(offset, "read at end of boundary", temp, l); } }</code><technical_language>Seek readahead limit..</technical_language>

Target:
public void testSeekToReadaheadExactlyAndRead() throws Throwable { describe("Seek to exactly the readahead limit and call" + " InputStream.read(byte[])"); Path path = path("testSeekToReadaheadExactlyAndRead"); FileSystem fs = getFileSystem(); writeTestDataset(path); try (FSDataInputStream in = fs.open(path)) { readAtEndAndReturn(in); final byte[] temp = new byte[5]; int offset = READAHEAD; in.seek(offset); int l = in.read(temp); LOG.info("Read of byte array at offset returned bytes", offset, l); assertTrue("Reading in temp data", l > 0); assertDatasetEquals(offset, "read at end of boundary", temp, l); } }
Source:
<code>public List<QuestionnaireResponse> getQuestionnaires() { return dataService.query(ENTITY_TYPE_META_DATA, EntityType.class) .eq(EntityTypeMetadata.EXTENDS, QUESTIONNAIRE) .findAll() .filter(entityType -> userPermissionEvaluator.hasPermission( new EntityTypeIdentity(entityType.getId()), EntityTypePermission.WRITE)) .map(entityType -> { String entityTypeId = entityType.getId(); Questionnaire questionnaireEntity = findQuestionnaireEntity(entityTypeId); <START> if (questionnaireEntity == null) <END> { Questionnaire questionnaire = questionnaireFactory.create( entityManager.create(entityType, POPULATE)); questionnaire.setOwner(getCurrentUsername()); questionnaire.setStatus(NOT_STARTED); dataService.add(entityType.getId(), questionnaire); return QuestionnaireResponse.create(questionnaire); } return QuestionnaireResponse.create(questionnaireEntity); }) .collect(toList()); }</code><technical_language>is this needed , this a side effect , i suggest splitting of a separate method/service if needed all</technical_language>

Target:
public List<QuestionnaireResponse> getQuestionnaires() { return dataService.query(ENTITY_TYPE_META_DATA, EntityType.class) .eq(EntityTypeMetadata.EXTENDS, QUESTIONNAIRE) .findAll() .filter(entityType -> userPermissionEvaluator.hasPermission( new EntityTypeIdentity(entityType.getId()), EntityTypePermission.WRITE)) .map(this::createQuestionnaireResponse) .collect(toList()); }
Source:
<code>public static SubscriptionInfo decode(final ByteBuffer data) { data.rewind(); final int version = data.getInt(); if (version > LATEST_SUPPORTED_VERSION) { final int latestSupportedVersion = data.getInt(); final SubscriptionInfoData subscriptionInfoData = new SubscriptionInfoData(); subscriptionInfoData.setVersion(version); <START> subscriptionInfoData.setLatestSupportedVersion(latestSupportedVersion); <END> return new SubscriptionInfo(subscriptionInfoData); } else { data.rewind(); final ByteBufferAccessor accessor = new ByteBufferAccessor(data); final SubscriptionInfoData subscriptionInfoData = new SubscriptionInfoData(accessor, (short) version); return new SubscriptionInfo(subscriptionInfoData); } }</code><technical_language>log entry? log.info("Unable decode subscription data: version: {}; latest supported version: {}", usedVersion, latestSupportedVersion);</technical_language>

Target:
public static SubscriptionInfo decode(final ByteBuffer data) { data.rewind(); final int version = data.getInt(); if (version > LATEST_SUPPORTED_VERSION) { final int latestSupportedVersion = data.getInt(); final SubscriptionInfoData subscriptionInfoData = new SubscriptionInfoData(); subscriptionInfoData.setVersion(version); subscriptionInfoData.setLatestSupportedVersion(latestSupportedVersion); LOG.info("Unable to decode subscription data: used version: {}; latest supported version: {}", version, latestSupportedVersion); return new SubscriptionInfo(subscriptionInfoData); } else { data.rewind(); final ByteBufferAccessor accessor = new ByteBufferAccessor(data); final SubscriptionInfoData subscriptionInfoData = new SubscriptionInfoData(accessor, (short) version); return new SubscriptionInfo(subscriptionInfoData); } }
Source:
<code><START> public static String[] fromFullName(String name) { <END> return new String[]{ name.substring(0, name.lastIndexOf(SEPARATOR)), name.substring(name.lastIndexOf(SEPARATOR) + 1) }; }</code><technical_language>"IgniteBiTuple<String, String>"? Array return type is confusing. necessarily asking for change here, curious</technical_language>

Target:
public static T2<String, String> fromFullName(String name) { return new T2<> ( name.substring(0, name.lastIndexOf(SEPARATOR)), name.substring(name.lastIndexOf(SEPARATOR) + 1) ); }
Source:
<code>public Boolean login(){ Reader reader = null; this.logger.debug("Do login for user '{}'", this.userName); try { HttpURLConnection httpURLConnection; <START> httpURLConnection = (HttpURLConnection) new URL(API_URL + "auth?email=" <END> + this.userName + "&password=" + this.password) .openConnection(); InputStream inputStream = httpURLConnection.getInputStream(); reader = new InputStreamReader(inputStream, "UTF-8"); JsonObject jsonObject = (JsonObject) jsonParser.parse(reader); String status = jsonObject.get("status").getAsString(); if(!status.equals("ok")){ return false; } this.logger.debug("Logon successfull"); this.authToken = jsonObject.get("authToken").getAsString(); return true; } catch(Exception ex) { this.logger.error("Error do logon: '{}'", ex.toString()); return false; } finally { if (reader != null) { try { reader.close(); } catch (IOException ignored) { } } } }</code><technical_language>DANGER ROBINSON, DANGER! Is password passed URL parameter? proxy record password. Please check API allows password passed a POST attribute..</technical_language>

Target:
public Boolean login() { Reader reader = null; logger.debug("Do login for user '{}'", this.userName); try { String url = API_URL + "auth?email=" + this.userName + "&password=" + this.password; HttpURLConnection httpURLConnection; httpURLConnection = (HttpURLConnection) new URL(url) .openConnection(); InputStream inputStream = httpURLConnection.getInputStream(); reader = new InputStreamReader(inputStream, "UTF-8"); JsonObject jsonObject = (JsonObject) jsonParser.parse(reader); String status = jsonObject.get("status").getAsString(); if (!status.equals("ok")) { return false; } logger.debug("Logon successfull"); authToken = jsonObject.get("authToken").getAsString(); return true; } catch (Exception ex) { logger.error("Error do logon: '{}'", ex.toString()); return false; } finally { if (reader != null) { try { reader.close(); } catch (IOException ignored) { } } } }
Source:
<code>public void testTemporaryStagingDirectorySessionProperties() { String tableName = "test_temporary_staging_directory_session_properties"; assertUpdate(format("CREATE TABLE %s(i int)", tableName)); Session session = Session.builder(getSession()) .setCatalogSessionProperty("hive", "temporary_staging_directory_enabled", "false") .build(); HiveInsertTableHandle hiveInsertTableHandle = getHiveInsertTableHandle(session, tableName); assertEquals(hiveInsertTableHandle.getLocationHandle().getWritePath(), hiveInsertTableHandle.getLocationHandle().getTargetPath()); session = Session.builder(getSession()) .setCatalogSessionProperty("hive", "temporary_staging_directory_path", "/tmp/custom/temporary-${USER}") <START> .build(); <END> hiveInsertTableHandle = getHiveInsertTableHandle(session, tableName); assertNotEquals(hiveInsertTableHandle.getLocationHandle().getWritePath(), hiveInsertTableHandle.getLocationHandle().getTargetPath()); assertTrue(hiveInsertTableHandle.getLocationHandle().getWritePath().toString().startsWith("file:/tmp/custom/temporary-")); assertUpdate("DROP TABLE " + tableName); }</code><technical_language>nit: explicitly put "temporary_staging_directory_enabled": "true"? I asking this I confused time, I realized temporary_staging_directory_enabled is default true</technical_language>

Target:
public void testTemporaryStagingDirectorySessionProperties() { String tableName = "test_temporary_staging_directory_session_properties"; assertUpdate(format("CREATE TABLE %s(i int)", tableName)); Session session = Session.builder(getSession()) .setCatalogSessionProperty("hive", "temporary_staging_directory_enabled", "false") .build(); HiveInsertTableHandle hiveInsertTableHandle = getHiveInsertTableHandle(session, tableName); assertEquals(hiveInsertTableHandle.getLocationHandle().getWritePath(), hiveInsertTableHandle.getLocationHandle().getTargetPath()); session = Session.builder(getSession()) .setCatalogSessionProperty("hive", "temporary_staging_directory_enabled", "true") .setCatalogSessionProperty("hive", "temporary_staging_directory_path", "/tmp/custom/temporary-${USER}") .build(); hiveInsertTableHandle = getHiveInsertTableHandle(session, tableName); assertNotEquals(hiveInsertTableHandle.getLocationHandle().getWritePath(), hiveInsertTableHandle.getLocationHandle().getTargetPath()); assertTrue(hiveInsertTableHandle.getLocationHandle().getWritePath().toString().startsWith("file:/tmp/custom/temporary-")); assertUpdate("DROP TABLE " + tableName); }
Source:
<code>public boolean shouldSchedule(Queue.Task p, List<Action> actions) { for (Action action : actions) { if (action instanceof CauseAction) { for (Cause c : ((CauseAction) action).getCauses()) { if (c instanceof BranchIndexingCause) { if (p instanceof Job) { Job j = (Job) p; OverrideIndexTriggersJobProperty overrideProp = <START> (OverrideIndexTriggersJobProperty) j.getProperty(OverrideIndexTriggersJobProperty.class); <END> if (j.getParent() instanceof MultiBranchProject) { MultiBranchProject mbp = (MultiBranchProject) j.getParent(); if (mbp.getParent() instanceof OrganizationFolder) { NoTriggerOrganizationFolderProperty prop = ((OrganizationFolder) mbp.getParent()).getProperties().get(NoTriggerOrganizationFolderProperty.class); if (prop != null) { String name = mbp.getProjectFactory().getBranch(j).getName(); if (!name.matches(prop.getBranches()) && (overrideProp == null || !overrideProp.getEnableTriggers())) { return false; } } } } } } } } } return true; }</code><technical_language>ant: ditto</technical_language>

Target:
public boolean shouldSchedule(Queue.Task p, List<Action> actions) { for (Action action : actions) { if (action instanceof CauseAction) { for (Cause c : ((CauseAction) action).getCauses()) { if (c instanceof BranchIndexingCause) { if (p instanceof Job) { Job<?,?> j = (Job) p; if (j.getParent() instanceof MultiBranchProject) { OverrideIndexTriggersJobProperty overrideProp = j.getProperty(OverrideIndexTriggersJobProperty.class); if (overrideProp != null) { return overrideProp.getEnableTriggers(); } else { MultiBranchProject mbp = (MultiBranchProject) j.getParent(); if (mbp.getParent() instanceof OrganizationFolder) { NoTriggerOrganizationFolderProperty prop = ((OrganizationFolder) mbp.getParent()).getProperties().get(NoTriggerOrganizationFolderProperty.class); if (prop != null) { String name = mbp.getProjectFactory().getBranch(j).getName(); if (!name.matches(prop.getBranches())) { return false; } } } } } } } } } } return true; }
Source:
<code>public void handleWaypoints() { if (getVisibleCachesCount() < Settings.getWayPointsThreshold()) { <START> Collection<String> baseGeocodes = Collections.<String>emptyList(); <END> if (baseOverlay != null) { baseGeocodes = baseOverlay.getCacheGeocodes(); } final boolean showStored = storedOverlay != null; wpOverlay.showWaypoints(baseGeocodes, showStored); } else { wpOverlay.hideWaypoints(); } }</code><technical_language>suggestion Collection<String> baseGeocodes = Collections.emptyList();</technical_language>

Target:
public void handleWaypoints() { if (getVisibleCachesCount() < Settings.getWayPointsThreshold()) { Collection<String> baseGeocodes = Collections.emptyList(); if (baseOverlay != null) { baseGeocodes = baseOverlay.getCacheGeocodes(); } final boolean showStored = storedOverlay != null; wpOverlay.showWaypoints(baseGeocodes, showStored); } else { wpOverlay.hideWaypoints(); } }
Source:
<code>int count(@Nonnull final Table<K, V, M> table) { txBeginMaybe(); operations.forEach(Runnable::run); operations.clear(); return table.count(); <START> } <END></code><technical_language>rid of touch() api</technical_language>

Target:
int count(@Nonnull final Table<K, V, M> table) { applyWritesForReadOnTable(table); table.getMetrics().incNumCounts(); return table.count(); }
Source:
<code>public void injectInSingletonInstance() throws Exception { final MarshallerInspector inspector = new MarshallerInspector(SingletonMarshaller.class); SingletonMarshaller instance1 = inspector.getInstance(ctx); assertNotSame(ctx, instance1.ctx); assertTrue(instance1.ctx instanceof ThreadSafeRenderingContext); ThreadSafeRenderingContext safeCtx = (ThreadSafeRenderingContext) instance1.ctx; assertNotNull(safeCtx.getDelegate()); assertSame(ctx, safeCtx.getDelegate()); ExecutorService executor = Executors.newSingleThreadExecutor(); try { <START> Future<?> future = executor.submit(new Runnable() { <END> @Override public void run() { SingletonMarshaller instance2 = inspector.getInstance(ctx); assertNotSame(ctx, instance2.ctx); assertTrue(instance2.ctx instanceof ThreadSafeRenderingContext); ThreadSafeRenderingContext safeCtx = (ThreadSafeRenderingContext) instance2.ctx; assertNotNull(safeCtx.getDelegate()); assertSame(ctx, safeCtx.getDelegate()); } }); executor.shutdown(); future.get(10, TimeUnit.SECONDS); } finally { executor.shutdownNow(); } }</code><technical_language>lambda</technical_language>

Target:
public void injectInSingletonInstance() throws Exception { final MarshallerInspector inspector = new MarshallerInspector(SingletonMarshaller.class); SingletonMarshaller instance1 = inspector.getInstance(ctx); assertNotSame(ctx, instance1.ctx); assertTrue(instance1.ctx instanceof ThreadSafeRenderingContext); ThreadSafeRenderingContext safeCtx = (ThreadSafeRenderingContext) instance1.ctx; assertNotNull(safeCtx.getDelegate()); assertSame(ctx, safeCtx.getDelegate()); ExecutorService executor = Executors.newSingleThreadExecutor(); try { Future<?> future = executor.submit(() -> { SingletonMarshaller instance2 = inspector.getInstance(ctx); assertNotSame(ctx, instance2.ctx); assertTrue(instance2.ctx instanceof ThreadSafeRenderingContext); ThreadSafeRenderingContext safeCtx2 = (ThreadSafeRenderingContext) instance2.ctx; assertNotNull(safeCtx2.getDelegate()); assertSame(ctx, safeCtx2.getDelegate()); }); executor.shutdown(); future.get(10, TimeUnit.SECONDS); } finally { executor.shutdownNow(); } }
Source:
<code>protected boolean deleteTopics(Collection<String> topics) { boolean deleteStatus = true; try { DeleteTopicsResult resultFutures = adminClient.deleteTopics(topics); <START> resultFutures.all().get(10000, TimeUnit.MILLISECONDS); <END> } catch (Exception e) { deleteStatus = false; } return deleteStatus; }</code><technical_language>time-out, time-unit argument</technical_language>

Target:
protected boolean deleteTopics(Collection<String> topics) { boolean deleteStatus = true; try { DeleteTopicsResult resultFutures = adminClient.deleteTopics(topics); resultFutures.all().get(ADMIN_OPERATION_WAIT_DURATION_MS, TimeUnit.MILLISECONDS); } catch (Exception e) { deleteStatus = false; } return deleteStatus; }
Source:
<code>private Mono<Void> handleChannel(int streamId, Frame firstFrame) { UnicastProcessor<Frame> frames = UnicastProcessor.create(); Flux<Payload> payloads = frames .doOnCancel(() -> { <START> if (connection.availability() > 0.0) { <END> connection.sendOne(Frame.Cancel.from(streamId)).subscribe(null, errorConsumer::accept); } }) .doOnError(t -> { if (connection.availability() > 0.0) { connection.sendOne(Frame.Error.from(streamId, t)).subscribe(null, errorConsumer::accept); } }) .doOnRequest(l -> { if (connection.availability() > 0.0) { connection.sendOne(Frame.RequestN.from(streamId, l)).subscribe(null, errorConsumer::accept); } }) .cast(Payload.class); return handleStream(streamId, requestChannel(payloads), firstFrame); }</code><technical_language>tangential this review. this check handled connection? change check call anyway. Specifically handle false anyway</technical_language>

Target:
private Mono<Void> handleChannel(int streamId, Frame firstFrame) { UnicastProcessor<Payload> frames = UnicastProcessor.create(); addChannelProcessor(streamId, frames); Flux<Payload> payloads = frames .doOnCancel(() -> { if (connection.availability() > 0.0) { connection.sendOne(Frame.Cancel.from(streamId)).subscribe(null, errorConsumer); } }) .doOnError(t -> { if (connection.availability() > 0.0) { connection.sendOne(Frame.Error.from(streamId, t)).subscribe(null, errorConsumer); } }) .doOnRequest(l -> { if (connection.availability() > 0.0) { connection.sendOne(Frame.RequestN.from(streamId, l)).subscribe(null, errorConsumer); } }) .doFinally(signalType -> { removeChannelProcessor(streamId); }); return handleStream(streamId, requestChannel(payloads), firstFrame); }
Source:
<code><START> public static boolean isLegalReviewerGroup(final AccountGroup.UUID groupUUID) { <END> if (AccountGroup.ANONYMOUS_USERS.equals(groupUUID) || AccountGroup.REGISTERED_USERS.equals(groupUUID)) { return false; } return true; }</code><technical_language>Pref: eliminate if, return boolean evaluation</technical_language>

Target:
public static boolean isLegalReviewerGroup(final AccountGroup.UUID groupUUID) { return !(AccountGroup.ANONYMOUS_USERS.equals(groupUUID) || AccountGroup.REGISTERED_USERS.equals(groupUUID)); }
Source:
<code>public void testSimpleAtomicBlockwisePUTWithBiggerNegociation() throws Exception { System.out.println("Simple atomic blockwise PUT with bigger size negociation"); reqtPayload = generateRandomPayload(300); respPayload = generateRandomPayload(50); String path = "test"; Request request = createRequest(PUT, path, server); request.setPayload(reqtPayload); client.sendRequest(request); server.expectRequest(CON, PUT, path).storeBoth("A").block1(0, true, 128).payload(reqtPayload.substring(0, 128)) .go(); server.sendResponse(ACK, CONTINUE).loadBoth("A").block1(0, true, 256).go(); server.expectRequest(CON, PUT, path).storeBoth("B").block1(1, true, 128) .payload(reqtPayload.substring(128, 256)).go(); server.sendResponse(ACK, CONTINUE).loadBoth("B").block1(1, true, 256).go(); <START> server.expectRequest(CON, PUT, path).storeBoth("C").block1(2, false, 128).go(); <END> server.sendResponse(ACK, CHANGED).loadBoth("C").block1(2, false, 256).payload(respPayload).go(); Response response = request.waitForResponse(1000); assertResponseContainsExpectedPayload(response, CHANGED, respPayload); printServerLog(clientInterceptor); }</code><technical_language>again, remaining payload (257 - 300)</technical_language>

Target:
public void testSimpleAtomicBlockwisePUTWithBiggerNegociation() throws Exception { System.out.println("Simple atomic blockwise PUT with bigger size negociation"); reqtPayload = generateRandomPayload(300); respPayload = generateRandomPayload(50); String path = "test"; Request request = createRequest(PUT, path, server); request.setPayload(reqtPayload); client.sendRequest(request); server.expectRequest(CON, PUT, path).storeBoth("A").block1(0, true, 128).payload(reqtPayload.substring(0, 128)) .go(); server.sendResponse(ACK, CONTINUE).loadBoth("A").block1(0, true, 256).go(); server.expectRequest(CON, PUT, path).storeBoth("B").block1(1, true, 128) .payload(reqtPayload.substring(128, 256)).go(); server.sendResponse(ACK, CONTINUE).loadBoth("B").block1(1, true, 256).go(); server.expectRequest(CON, PUT, path).storeBoth("C").block1(2, false, 128) .payload(reqtPayload.substring(256, 300)).go(); server.sendResponse(ACK, CHANGED).loadBoth("C").block1(2, false, 256).payload(respPayload).go(); Response response = request.waitForResponse(1000); assertResponseContainsExpectedPayload(response, CHANGED, respPayload); printServerLog(clientInterceptor); }
Source:
<code>public void handleAction(ActionParameters params) throws ActionException { params.requireLoggedInUser(); int id = params.getRequiredParamInt(ActionConstants.PARAM_ID); if (!indicatorService.delete(id, params.getUser().getId())) { throw new ActionParamsException("Unknown indicator/not the owner of the indicator."); } LOG.info("Deleting indicator", id); <START> if (!indicatorService.delete(id, params.getUser().getId())) { <END> throw new ActionDeniedException("Tried to delete indicator from other user"); } ResponseHelper.writeResponse(params, JSONHelper.createJSONObject("deleted", id)); }</code><technical_language>indicatorService.delete(id, params.getUser().getId()) is called twice</technical_language>

Target:
public void handleAction(ActionParameters params) throws ActionException { params.requireLoggedInUser(); int id = params.getRequiredParamInt(ActionConstants.PARAM_ID); if (!indicatorService.delete(id, params.getUser().getId())) { throw new ActionParamsException("Unknown indicator/not the owner of the indicator."); } LOG.info("Deleted indicator", id); ResponseHelper.writeResponse(params, JSONHelper.createJSONObject("deleted", id)); }
Source:
<code>protected boolean evaluatePredicate(List<String> trueVariables, String pred) { Expression expression; try { expression = StaticJavaParser.parseExpression(pred); } catch (ParseProblemException p) { <START> throw new BugInCF("unparseable predicate: " + pred + ". Parse exception: " + p); <END> } return evaluateBooleanExpression(expression, trueVariables); }</code><technical_language>BugInCF is for bugs in Checker Framework itself. This more a UserError. Or, pass exception caller. Please check of BugInCF</technical_language>

Target:
protected boolean evaluatePredicate(List<String> trueVariables, String pred) { Expression expression; try { expression = StaticJavaParser.parseExpression(pred); } catch (ParseProblemException p) { throw new UserError("unparseable predicate: " + pred + ". Parse exception: " + p); } return evaluateBooleanExpression(expression, trueVariables); }
Source:
<code>public ZkBaseDataAccessor<byte[]> getByteArrayBaseDataAccessor() { if (_byteArrayBaseDataAccessor == null) { synchronized (this) { if (_byteArrayBaseDataAccessor == null) { _byteArrayBaseDataAccessor = new ZkBaseDataAccessor<>(_zkAddr, new ZkSerializer() { @Override <START> public byte[] serialize(Object o) throws ZkMarshallingError { return (byte[]) o; <END> } @Override public Object deserialize(byte[] bytes) throws ZkMarshallingError { return bytes; } }); } } } return _byteArrayBaseDataAccessor; }</code><technical_language>support this yet, throw unsupported exception</technical_language>

Target:
public ZkBaseDataAccessor<byte[]> getByteArrayBaseDataAccessor() { if (_byteArrayBaseDataAccessor == null) { synchronized (this) { if (_byteArrayBaseDataAccessor == null) { _byteArrayBaseDataAccessor = new ZkBaseDataAccessor<>(_zkAddr, new ZkSerializer() { @Override public byte[] serialize(Object o) throws ZkMarshallingError { throw new UnsupportedOperationException("Serialize is not supported yet!"); } @Override public Object deserialize(byte[] bytes) throws ZkMarshallingError { return bytes; } }); } } } return _byteArrayBaseDataAccessor; }
Source:
<code>public void init() { int numThreads = 2 * Runtime.getRuntime().availableProcessors(); LOGGER.debug("{} size: {}", QUERY_POOL_NAME, numThreads); if (queryExecutor != null) { destroy(); } queryExecutor = new ThreadPoolExecutor( numThreads, numThreads, 0L, TimeUnit.MILLISECONDS, <START> new LinkedBlockingDeque<>(BLOCKING_Q_INITIAL_SIZE), <END> StandardThreadFactoryBuilder.newThreadFactory(QUERY_POOL_NAME), new ThreadPoolExecutor.CallerRunsPolicy()); queryExecutor.prestartAllCoreThreads(); }</code><technical_language>INITIAL_SIZE is misleading this constructor creates a fixed-capacity queue. this is maximum size</technical_language>

Target:
public void init() { int numThreads = 2 * Runtime.getRuntime().availableProcessors(); String threadProp = System.getProperty(ENDPOINT_THREADPOOL_COUNT); if (threadProp != null) { try { numThreads = Integer.parseInt(threadProp); } catch (NumberFormatException nfe) { LOGGER.info( "Unable to use configured pool size: {}, defaulting to: {}", ENDPOINT_THREADPOOL_COUNT, threadProp, numThreads, nfe); } } LOGGER.debug("{} size: {}", QUERY_POOL_NAME, numThreads); if (queryExecutor != null) { destroy(); } queryExecutor = new ThreadPoolExecutor( numThreads, numThreads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingDeque<>(MAX_Q_SIZE), StandardThreadFactoryBuilder.newThreadFactory(QUERY_POOL_NAME), new ThreadPoolExecutor.CallerRunsPolicy()); queryExecutor.prestartAllCoreThreads(); }
Source:
<code>public void sendResponse(ResponseMsg response, ChannelHandlerContext ctx) { ctx.writeAndFlush(response, ctx.voidPromise()); <START> log.trace("Sent response: {}", response); <END> }</code><technical_language>wrap this if (log.isTraceEnable)</technical_language>

Target:
public void sendResponse(ResponseMsg response, ChannelHandlerContext ctx) { ctx.writeAndFlush(response, ctx.voidPromise()); if(log.isTraceEnabled()) { log.trace("Sent response: {}", response); } }
Source:
<code>public Schematic build() throws IllegalArgumentException { if (this.palette == null) { this.palette = this.type.create(); } checkArgument(this.volume != null || this.view != null); Vector3i min; Vector3i size; if (this.volume != null) { min = this.volume.getBlockMin(); size = this.volume.getBlockSize(); } else { min = this.view.getBlockMin(); size = this.view.getBlockSize(); } if (this.metadata == null) { this.metadata = new MemoryDataContainer(); } for (Map.Entry<String, Object> entry : this.metaValues.entrySet()) { this.metadata.set(DataQuery.of(".", entry.getKey()), entry.getValue()); } if (this.volume == null) { final MutableBlockVolume volume; if (this.palette.getHighestId() <= 0xFF) { volume = new ByteArrayMutableBlockBuffer(this.palette, min, size); } else if (this.palette.getHighestId() <= 0xFFFF) { volume = new CharArrayMutableBlockBuffer(this.palette, min, size); } else { volume = new IntArrayMutableBlockBuffer(this.palette, min, size); } Map<Vector3i, TileEntityArchetype> tiles = Maps.newHashMap(); this.view.getBlockWorker(SpongeImpl.getImplementationCause()).iterate((v, x, y, z) -> { volume.setBlock(x, y, z, v.getBlock(x, y, z), SpongeImpl.getImplementationCause()); Optional<TileEntity> tile = v.getTileEntity(x, y, z); if (tile.isPresent()) { tiles.put(new Vector3i(x, y, z), tile.get().createArchetype()); } }); return new SpongeSchematic(volume, tiles, this.metadata); } else { <START> return new SpongeSchematic((SpongeArchetypeVolume) this.volume, this.metadata); <END> } }</code><technical_language>nest this in else pointless</technical_language>

Target:
public Schematic build() throws IllegalArgumentException { if (this.palette == null) { this.palette = this.type.create(); } checkArgument(this.volume != null || this.view != null); Vector3i min; Vector3i size; if (this.volume != null) { min = this.volume.getBlockMin(); size = this.volume.getBlockSize(); } else { min = this.view.getBlockMin(); size = this.view.getBlockSize(); } if (this.metadata == null) { this.metadata = new MemoryDataContainer(); } for (Map.Entry<String, Object> entry : this.metaValues.entrySet()) { this.metadata.set(DataQuery.of(".", entry.getKey()), entry.getValue()); } if (this.volume == null) { final MutableBlockVolume volume; if (this.palette.getHighestId() <= 0xFF) { volume = new ByteArrayMutableBlockBuffer(this.palette, min, size); } else if (this.palette.getHighestId() <= 0xFFFF) { volume = new CharArrayMutableBlockBuffer(this.palette, min, size); } else { volume = new IntArrayMutableBlockBuffer(this.palette, min, size); } Map<Vector3i, TileEntityArchetype> tiles = Maps.newHashMap(); this.view.getBlockWorker(SpongeImpl.getImplementationCause()).iterate((v, x, y, z) -> { volume.setBlock(x, y, z, v.getBlock(x, y, z), SpongeImpl.getImplementationCause()); Optional<TileEntity> tile = v.getTileEntity(x, y, z); if (tile.isPresent()) { tiles.put(new Vector3i(x, y, z), tile.get().createArchetype()); } }); return new SpongeSchematic(volume, tiles, this.metadata); } return new SpongeSchematic((SpongeArchetypeVolume) this.volume, this.metadata); }
Source:
<code>private void processDigest(ConcurrentMap<Client, PaxosLong> currentCachedEntries, AcceptorCacheDigest digest) { TimestampedAcceptorCacheKey newCacheKey = TimestampedAcceptorCacheKey.of(digest); ConcurrentMap<Client, PaxosLong> newCachedEntries = <START> cacheKeysToCaches.get(newCacheKey.cacheKey(), $ -> currentCachedEntries); <END> KeyedStream.stream(digest.updates()) .map(PaxosLong::of) .forEach((client, paxosLong) -> newCachedEntries.merge(client, paxosLong, BatchingPaxosLatestSequenceCache::max)); maybeSetNewCacheKey(newCacheKey); }</code><technical_language>new cache key this point</technical_language>

Target:
private void processDigest(ConcurrentMap<Client, PaxosLong> currentCachedEntries, AcceptorCacheDigest digest) { TimestampedAcceptorCacheKey newCacheKey = TimestampedAcceptorCacheKey.of(digest); ConcurrentMap<Client, PaxosLong> newCachedEntries = cacheKeysToCaches.get(newCacheKey.cacheKey(), $ -> currentCachedEntries); KeyedStream.stream(digest.updates()) .map(PaxosLong::of) .forEach((client, paxosLong) -> newCachedEntries.merge(client, paxosLong, BatchingPaxosLatestSequenceCache::max)); accumulateLatestCacheKey(newCacheKey); }
Source:
<code><START> public void addServoEventListener(NameProvider service) { <END> isEventsEnabled = true; addListener("publishServoEvent", service.getName(), "onServoEvent"); }</code><technical_language>this method refactored new attach(ServoListener) .. is is calling addListener in this method</technical_language>

Target:
public void addServoEventListener(NameProvider service) { isEventsEnabled = true; subscribe(getName(), "publishServoEvent"); }
Source:
<code>protected boolean disconnectStorageDomain(StorageDomain storageDomain) { try { return StorageHelperDirector.getInstance() .getItem(storageDomain.getStorageType()) .disconnectStorageFromDomainByVdsId(storageDomain, getVdsId()); } catch (RuntimeException e) { <START> log.error("Exception while disconnect storage domain", e); <END> return false; } }</code><technical_language>s/disconnect/disconnecting</technical_language>

Target:
protected boolean disconnectStorageDomain(StorageDomain storageDomain) { try { return StorageHelperDirector.getInstance() .getItem(storageDomain.getStorageType()) .disconnectStorageFromDomainByVdsId(storageDomain, getVdsId()); } catch (RuntimeException e) { log.error("Exception while disconnecting a storage domain", e); return false; } }
Source:
<code>public void verifyAdditionalPropertyResponse() throws Exception { Map<String, String> queryParams = new HashMap<String, String>(); String str = client.invokeAPI("/mockResponses/additionalPropertiesTest", "GET", queryParams, null, new HashMap<String, String>(), null, "application/json", null, new String[0]); assertEquals(str, "{\"key\":\"key\",\"value\":\"string\"}"); <START> } <END></code><technical_language>right, "{\"foo\":0,\"additionalPropertyExampleKey\":\"string\"}"</technical_language>

Target:
public void verifyAdditionalPropertyResponse() throws Exception { Map<String, String> queryParams = new HashMap<String, String>(); String str = client.invokeAPI("/mockResponses/additionalPropertiesTest", "GET", queryParams, null, new HashMap<String, String>(), null, "application/json", null, new String[0]); assertEquals(str, "{\"foo\":0,\"additionalProperty\":\"string\"}"); }
Source:
<code>public Mono<ResponseEntity<?>> updateWorkflowInstance( @ApiParam("Internal id for workflow instance") @PathVariable("id") long id, @RequestBody @ApiParam("Submitted workflow instance information") UpdateWorkflowInstanceRequest req) { return handleExceptions(() -> { <START> return wrapBlocking(() -> { <END> boolean updated = super.updateWorkflowInstance(id, req, workflowInstanceFactory, workflowInstances, workflowInstanceDao); return (updated ? noContent() : status(CONFLICT)).build(); }); }); }</code><technical_language>remove unnecessary { return x; } wrapBlocking</technical_language>

Target:
public Mono<ResponseEntity<?>> updateWorkflowInstance( @ApiParam("Internal id for workflow instance") @PathVariable("id") long id, @RequestBody @ApiParam("Submitted workflow instance information") UpdateWorkflowInstanceRequest req) { return handleExceptions(() -> wrapBlocking(() -> { boolean updated = super.updateWorkflowInstance(id, req, workflowInstanceFactory, workflowInstances, workflowInstanceDao); return (updated ? noContent() : status(CONFLICT)).build(); })); }
Source:
<code>public static void main(String... args) throws IOException { String mantaUserName = "USERNAME"; String privateKeyPath = "PATH/.ssh/id_rsa"; String publicKeyId = "04:92:7b:23:bc:08:4f:d7:3b:5a:38:9e:4a:17:2e:df"; ConfigContext config = new ChainedConfigContext( new DefaultsConfigContext(), new EnvVarConfigContext(), new MapConfigContext(System.getProperties())) .setMantaURL("<LINK_0>") .setMantaUser(mantaUserName) .setMantaKeyPath(privateKeyPath) .setMantaKeyId(publicKeyId) .setClientEncryptionEnabled(true) .setEncryptionAlgorithm("AES256/CTR/NoPadding") .setEncryptionAuthenticationMode(EncryptionAuthenticationMode.Mandatory) .setPermitUnencryptedDownloads(false) .setEncryptionKeyId("simple/example") .setEncryptionPrivateKeyBytes(Base64.getDecoder().decode("RkZGRkZGRkJEOTY3ODNDNkM5MUUyMjIyMTExMTIyMjI=")); try (MantaClient client = new MantaClient(config)) { <START> String mantaPath = MantaClient.SEPARATOR + mantaUserName + "/stor/foo"; <END> MantaObjectResponse response = client.put(mantaPath, "This is my secret\nthat I want encrypted."); System.out.println("HTTP Response headers:"); System.out.println(response.getHttpHeaders().toString()); try (InputStream is = client.getAsInputStream(mantaPath); Scanner scanner = new Scanner(is, StandardCharsets.UTF_8.name())) { while (scanner.hasNextLine()) { System.out.println(scanner.nextLine()); } } } }</code><technical_language>separator for slashes in /stor/foo string well</technical_language>

Target:
public static void main(String... args) throws IOException { String mantaUserName = "USERNAME"; String privateKeyPath = "PATH/.ssh/id_rsa"; String publicKeyId = "04:92:7b:23:bc:08:4f:d7:3b:5a:38:9e:4a:17:2e:df"; ConfigContext config = new ChainedConfigContext( new DefaultsConfigContext(), new EnvVarConfigContext(), new MapConfigContext(System.getProperties())) .setMantaURL("<LINK_0>") .setMantaUser(mantaUserName) .setMantaKeyPath(privateKeyPath) .setMantaKeyId(publicKeyId) .setClientEncryptionEnabled(true) .setEncryptionAlgorithm("AES256/CTR/NoPadding") .setEncryptionAuthenticationMode(EncryptionAuthenticationMode.Mandatory) .setPermitUnencryptedDownloads(false) .setEncryptionKeyId("simple/example") .setEncryptionPrivateKeyBytes(Base64.getDecoder().decode("RkZGRkZGRkJEOTY3ODNDNkM5MUUyMjIyMTExMTIyMjI=")); try (MantaClient client = new MantaClient(config)) { String mantaPath = SEPARATOR + mantaUserName + SEPARATOR + "stor" + SEPARATOR + "foo"; MantaObjectResponse response = client.put(mantaPath, "This is my secret\nthat I want encrypted."); System.out.println("HTTP Response headers:"); System.out.println(response.getHttpHeaders().toString()); try (InputStream is = client.getAsInputStream(mantaPath); Scanner scanner = new Scanner(is, StandardCharsets.UTF_8.name())) { while (scanner.hasNextLine()) { System.out.println(scanner.nextLine()); } } } }
Source:
<code>private void loggingAutoCommitHelper() throws SQLException { Connection conn = this.getConnection(); if(stmt.getUpdateOperation().isMutation() && conn.getAutoCommit()){ phoenixMetricsLog.logWriteMetricsfoForMutationsSinceLastReset( PhoenixRuntime.getWriteMetricInfoForMutationsSinceLastReset(conn)); <START> phoenixMetricsLog.logReadMetricInfoForMutationsSinceLastReset( <END> PhoenixRuntime.getReadMetricInfoForMutationsSinceLastReset(conn)); PhoenixRuntime.resetMetrics(conn); } return; }</code><technical_language>conn.getAutoCommit() check sufficient</technical_language>

Target:
private void loggingAutoCommitHelper() throws SQLException { if(conn.getAutoCommit() && (conn instanceof LoggingPhoenixConnection)) { ((LoggingPhoenixConnection)conn).loggingMetricsHelper(); } }
Source:
<code>public void getGeneratedKeysWithNoAutoIncTest() throws DatabaseEngineException { final DbEntity entity = dbEntity() .name("TEST") .addColumn("COL1", STRING) .addColumn("COL2", STRING) .pkFields(ImmutableSet.of("COL1", "COL2")) .build(); this.engine.addEntity(entity); final EntityEntry ee = entry() .set("COL1", "VAL1") .set("COL2", "VAL2") .build(); <START> Assertions.assertThat(this.engine.persist("TEST", ee)) <END> .as("The auto generated value should be null!") .isNull(); }</code><technical_language>Import Assertions call static assertThat()</technical_language>

Target:
public void getGeneratedKeysWithNoAutoIncTest() throws DatabaseEngineException { final DbEntity entity = dbEntity() .name("TEST") .addColumn("COL1", STRING) .addColumn("COL2", STRING) .pkFields(ImmutableSet.of("COL1", "COL2")) .build(); this.engine.addEntity(entity); final EntityEntry ee = entry() .set("COL1", "VAL1") .set("COL2", "VAL2") .build(); assertThat(this.engine.persist("TEST", ee)) .as("The auto generated value should be null!") .isNull(); }
Source:
<code>private Publisher<Link> linksFetcher(DataFetchingEnvironment env) { <START> return subscriber -> { <END> sendData(subscriber, 0); }; }</code><technical_language>example simplified creating a Flowable links Iterable operators add some delay emission</technical_language>

Target:
private Publisher<Link> linksFetcher(DataFetchingEnvironment env) { return Flowable.fromIterable(links) .delay(1, TimeUnit.SECONDS); }
Source:
<code>public static String unquoteSingleQuotes(String s) { if (s.length() >= 2) { if (s.charAt(0) == '\'' && s.charAt(s.length() - 1) == '\'') { <START> return s.substring(1, s.length() - 1); <END> } } return s; }</code><technical_language>Please revert this. implementation is incorrect. Quoting a single quote works doubling it. SQL literal '''' 4 single quotes, produces string ' i.e. a single quote, is covered implementation. change this anyway</technical_language>

Target:
public static String unquoteSingleQuotes(String s) { return unquote(s, '\''); }
Source:
<code>public void testNPEOnMutableGlobal() throws Exception { KieSession ksession = session.getStateful(); List<String> context = new ArrayList<String>(); ksession.setGlobal("context", context); FactHandle b = ksession.insert( new Message( "b" ) ); ksession.delete(b); int fired = ksession.fireAllRules(1); <START> Assertions.assertThat(0).isEqualTo(fired); <END> ksession.dispose(); }</code><technical_language>expected end</technical_language>

Target:
public void testNPEOnMutableGlobal() throws Exception { KieSession ksession = session.getStateful(); List<String> context = new ArrayList<String>(); ksession.setGlobal("context", context); ksession.setGlobal("LOGGER", LOGGER); FactHandle b = ksession.insert( new Message( "b" ) ); ksession.delete(b); int fired = ksession.fireAllRules(1); Assertions.assertThat(fired).isEqualTo(0); ksession.dispose(); }
Source:
<code>public StreamDeployer(ZooKeeperConnection zkConnection, StreamDefinitionRepository repository, StreamRepository streamRepository, XDParser parser) { super(zkConnection, repository, streamRepository, parser, stream); this.zkConnection = zkConnection; this.parser = parser; <START> updateModuleDefinitions(); <END> }</code><technical_language>I this method called in a constructor</technical_language>

Target:
public StreamDeployer(ZooKeeperConnection zkConnection, StreamDefinitionRepository repository, StreamRepository streamRepository, XDParser parser) { super(zkConnection, repository, streamRepository, parser, stream); this.zkConnection = zkConnection; this.parser = parser; }
Source:
<code>public Status getStatus() { synchronized (LOCK) { if (cachedStatus != null && cachedStatus.getTimeUTC() != null) { long lastUpdateTimeSkew = System.currentTimeMillis() - cachedStatus.getTimeUTC().getTime(); if (lastUpdateTimeSkew <= STATUS_CACHE_TTL) { <START> log.debug("Returning cached status. Last Update Date: {}, Age: {}", <END> cachedStatus.getTimeUTC(), lastUpdateTimeSkew); return cachedStatus; } log.debug("Cache existed but had expired. Date: {}, Age: {}ms", cachedStatus.getTimeUTC(), lastUpdateTimeSkew); } reset(); } return null; }</code><technical_language>Consistency issue debug statements I gave you: age "ms" it, below</technical_language>

Target:
public Status getStatus() { synchronized (LOCK) { if (cachedStatus != null && cachedStatus.getTimeUTC() != null) { long lastUpdateTimeSkew = System.currentTimeMillis() - cachedStatus.getTimeUTC().getTime(); if (lastUpdateTimeSkew <= STATUS_CACHE_TTL) { log.debug("Returning cached status. Last Update Date: {}, Age: {}ms", cachedStatus.getTimeUTC(), lastUpdateTimeSkew); return cachedStatus; } log.debug("Cache existed but had expired. Date: {}, Age: {}ms", cachedStatus.getTimeUTC(), lastUpdateTimeSkew); } reset(); } return null; }
Source:
<code><START> public Charset charset() { <END> return (this.encoding != null) ? this.encoding : Util.UTF_8; }</code><technical_language>Hrmmm, why?! if encoding is null this is a binary protocol</technical_language>

Target:
public Charset charset() { return this.encoding; }
Source:
<code>private void process(OpenGuiMessage msg) { <START> EntityPlayer player = FMLClientHandler.instance().getClientPlayerEntity(); <END> Object owner = msg.instance.getOwner(player.worldObj, player); if(owner == null) return; Object gui = msg.instance.clientElement(player.worldObj, player); FMLClientHandler.instance().showGuiScreen(gui); player.openContainer.windowId = msg.identifier; }</code><technical_language>access FMLClientHandler (or FMLServerHandler for matter, breaks game) directly. FMLCommonHandler</technical_language>

Target:
private void process(OpenGuiMessage msg) { EntityPlayer player = FMLClientHandler.instance().getClientPlayerEntity(); Object gui = msg.provider.clientElement(player.worldObj, player); FMLClientHandler.instance().showGuiScreen(gui); player.openContainer.windowId = msg.windowID; }
Source:
<code><START> public static @NotNull IReferencePoint create(@NotNull Module module) { <END> IPath path = IntelliJPathImpl.fromString(module.getName()); return new ReferencePointImpl(path); }</code><technical_language>current style for method return annotation is put declaration. This applies other usages in this PR. suggestion @NotNull public static IReferencePoint create(@NotNull Module module) {</technical_language>

Target:
public static IReferencePoint create(@NotNull Module module) { IPath path = IntelliJPathImpl.fromString(module.getModuleFilePath()); return new ReferencePointImpl(path); }