<commit_before>package org.bridj.cpp.com;

import org.bridj.Pointer;

import org.bridj.ann.Convention;
import org.bridj.ann.Virtual;
import org.bridj.ann.Convention.Style;

import org.bridj.*;
import org.bridj.ann.*;
import org.bridj.ann.Runtime;
import static org.bridj.cpp.com.COMRuntime.*;

@IID("00000001-0000-0000-C000-000000000046")
public class IClassFactory extends IUnknown
{
	@Virtual(0) // TODO handle in runtime not as zero but as count of parents' virtual methods + 0
	@Deprecated
	public native int CreateInstance( 
		Pointer<IUnknown> pUnkOuter,
		Pointer<Byte> riid,
		Pointer<Pointer<IUnknown>> ppvObject
	);
	
	public <I extends IUnknown> I CreateInstance(Class<I> type) {
		Pointer<Pointer<IUnknown>> p = Pointer.allocatePointer(IUnknown.class);
		int ret = CreateInstance(null, getIID(type), p);
		if (ret != S_OK)
			return null;
		
		return p.get().getNativeObject(type);
	}
	
	@Virtual(1)
	public native int LockServer(boolean fLock);
};<commit_msg>BridJ: typo<commit_after>package org.bridj.cpp.com;

import org.bridj.Pointer;

import org.bridj.ann.Convention;
import org.bridj.ann.Virtual;
import org.bridj.ann.Convention.Style;

import org.bridj.*;
import org.bridj.ann.*;
import org.bridj.ann.Runtime;
import static org.bridj.cpp.com.COMRuntime.*;

@IID("00000001-0000-0000-C000-000000000046")
public class IClassFactory extends IUnknown
{
	@Virtual(0) // TODO handle in runtime not as zero but as count of parents' virtual methods + 0
	@Deprecated
	public native int CreateInstance( 
		Pointer<IUnknown> pUnkOuter,
		Pointer<Byte> riid,
		Pointer<Pointer<IUnknown>> ppvObject
	);
	
	public <I extends IUnknown> I CreateInstance(Class<I> type) {
		Pointer<Pointer<IUnknown>> p = Pointer.allocatePointer(IUnknown.class);
		int ret = CreateInstance(null, getIID(type), p);
		if (ret != S_OK)
			return null;
		
		return p.get().getNativeObject(type);
	}
	
	@Virtual(1)
	public native int LockServer(boolean fLock);
}
{'fraction_non_alphanumeric': 0.12364760432766615, 'fraction_numerical': 0.03503348789283874, 'mean_word_length': 4.884848484848485, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6963090', 'n_tokens_mistral': 742, 'n_tokens_neox': 653, 'n_words': 161}