nus-yam/ex-repair huggingface dataset:
Buggy code:
public class NetworkImageRenderer implements ImageWindowRenderer { public ImageWindow w ; Vector3d [ ] previewPoints ; public NetworkImageRenderer ( ImageWindow w ) { } public Collection < Network > getVisibleObjects ( ) { } public void draw ( Graphics g ) { } public void dataChangedEvent ( ) { } private double projectSphere ( double r , double z ) { } Vector3i getMousePosImage ( EvStack stack , MouseEvent e ) { } Vector3d getMousePosWorld ( MouseEvent e ) { <START_BUG> Vector2d u = w . transformVectorS2W ( new Vector2d ( e . getX ( ) , e . getY ( ) ) ) ; <END_BUG> return new Vector3d ( u . x , u . y , w . getZ ( ) . doubleValue ( ) ) ; } EvStack getCurrentStack ( ) { } public static void initPlugin ( ) { } }

Fix:
Vector2d u = w . transformPointS2W ( new Vector2d ( e . getX ( ) , e . getY ( ) ) ) ;
Buggy code:
public abstract class XMLDataClient extends Observable { protected XMLDataClient ( ) { } private java . net . URL getXMLURL ( ) throws MalformedURLException { <START_BUG> return new java . net . URL ( URL ) ; <END_BUG> } public void setURL ( String baseURL , String argumentString ) { } public void setURL ( String baseURL , List < String > arguments ) { } public boolean hasLoadedOnce ( ) { } private class GetDataAsyncTask extends AsyncTask < Void , Void , Void > { @ Override protected Void doInBackground ( Void ... arg0 ) { } @ Override protected void onPostExecute ( Void result ) { } } protected abstract void reloadData ( ) { } public void refreshClient ( ) { } protected void parse ( SAXHandler < ? > h ) { } protected void clientNotifyObservers ( ) { } private XMLReader xr ; private SAXParser sp ; private SAXParserFactory spf ; private String URL ; protected java . net . URL xmlURL ; private boolean dataLoadedOnce ; private XMLDataClient . GetDataAsyncTask getDataTask ; }

Fix:
return ( URL ) == null ? null : new java . net . URL ( URL ) ;
Buggy code:
final class ContextAuthority extends ExpressionAuthority { private static final boolean DEBUG = Policy . DEBUG_CONTEXTS ; private static final String DISPOSE_LISTENER = "org.eclipse.ui.internal.contexts.ContextAuthority" ; private final Set [ ] activationsBySourcePriority = new Set [ 33 ] ; private final Map contextActivationsByContextId = new HashMap ( ) ; private final ContextManager contextManager ; private final IContextService contextService ; private final Map registeredWindows = new WeakHashMap ( ) ; ContextAuthority ( final ContextManager contextManager , final IContextService contextService ) { } final void activateContext ( final IContextActivation activation ) { } private final void checkWindowType ( final Shell newShell , final Shell oldShell ) { } private final boolean containsActive ( final Collection activations ) { } final void deactivateContext ( final IContextActivation activation ) { } final Shell getActiveShell ( ) { } public final int getShellType ( final Shell shell ) { } public final boolean registerShell ( final Shell shell , final int type ) { } protected final void sourceChanged ( final int sourcePriority ) { } public final boolean unregisterShell ( final Shell shell ) { } private final void updateContext ( final String contextId , final boolean active ) { } protected final void updateEvaluationContext ( final String name , final Object value ) { <START_BUG> if ( ( name != null ) && ( ! ( ACTIVE_WORKBENCH_WINDOW_NAME . equals ( name ) ) ) ) { <END_BUG> if ( ACTIVE_SHELL_NAME . equals ( name ) ) { checkWindowType ( ( ( Shell ) ( value ) ) , ( ( Shell ) ( getVariable ( ACTIVE_SHELL_NAME ) ) ) ) ; } changeVariable ( name , value ) ; } } final void updateShellKludge ( ) { } }

Fix:
if ( ( name != null ) && ( ! ( ACTIVE_WORKBENCH_WINDOW_SHELL_NAME . equals ( name ) ) ) ) {
Buggy code:
public class TestLucene40PostingsReader extends LuceneTestCase { static final String [ ] terms = new String [ 100 ] ; @ BeforeClass public static void beforeClass ( ) { } public void testPostings ( ) throws Exception { Directory dir = newFSDirectory ( createTempDir ( "postings" ) ) ; IndexWriterConfig iwc = newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) ; iwc . setCodec ( Codec . forName ( "Lucene40" ) ) ; RandomIndexWriter iw = new RandomIndexWriter ( random ( ) , dir , iwc ) ; Document doc = new Document ( ) ; FieldType idType = new FieldType ( StringField . TYPE_NOT_STORED ) ; idType . setStoreTermVectors ( true ) ; Field idField = new Field ( "id" , "" , idType ) ; doc . add ( idField ) ; FieldType titleType = new FieldType ( TextField . TYPE_NOT_STORED ) ; titleType . setStoreTermVectors ( true ) ; titleType . setStoreTermVectorPositions ( true ) ; titleType . setStoreTermVectorOffsets ( true ) ; titleType . setIndexOptions ( indexOptions ( ) ) ; Field titleField = new Field ( "title" , "" , titleType ) ; doc . add ( titleField ) ; FieldType bodyType = new FieldType ( TextField . TYPE_NOT_STORED ) ; bodyType . setStoreTermVectors ( true ) ; bodyType . setStoreTermVectorPositions ( true ) ; bodyType . setStoreTermVectorOffsets ( true ) ; bodyType . setIndexOptions ( indexOptions ( ) ) ; Field bodyField = new Field ( "body" , "" , bodyType ) ; doc . add ( bodyField ) ; int numDocs = atLeast ( 1000 ) ; for ( int i = 0 ; i < numDocs ; i ++ ) { idField . setStringValue ( Integer . toString ( i ) ) ; titleField . setStringValue ( fieldValue ( 1 ) ) ; bodyField . setStringValue ( fieldValue ( 3 ) ) ; iw . addDocument ( doc ) ; if ( ( random ( ) . nextInt ( 20 ) ) == 0 ) { iw . deleteDocuments ( new Term ( "id" , Integer . toString ( i ) ) ) ; } } if ( random ( ) . nextBoolean ( ) ) { iw . deleteDocuments ( new Term ( "title" , TestLucene40PostingsReader . terms [ random ( ) . nextInt ( TestLucene40PostingsReader . terms . length ) ] ) ) ; } <START_BUG> iw . close ( ) ; <END_BUG> dir . close ( ) ; } IndexOptions indexOptions ( ) { } String fieldValue ( int maxTF ) { } }

Fix:
iw . shutdown ( ) ;
Buggy code:
class BindingResolver { BindingResolver ( ) { } void store ( ASTNode newNode , org . eclipse . jdt . internal . compiler . ast . ASTNode oldASTNode ) { } IBinding resolveName ( Name name ) { } ITypeBinding resolveType ( Type type ) { } ITypeBinding resolveWellKnownType ( String name ) { } ITypeBinding resolveType ( TypeDeclaration type ) { } ITypeBinding resolveTypeParameter ( TypeParameter typeParameter ) { } ITypeBinding resolveType ( EnumDeclaration type ) { } ITypeBinding resolveType ( AnonymousClassDeclaration type ) { } ITypeBinding resolveType ( AnnotationTypeDeclaration type ) { } IMethodBinding resolveMethod ( MethodDeclaration method ) { } IMethodBinding resolveMethod ( MethodInvocation method ) { } IMethodBinding resolveMethod ( SuperMethodInvocation method ) { } IVariableBinding resolveVariable ( VariableDeclaration variable ) { } IVariableBinding resolveVariable ( EnumConstantDeclaration enumConstant ) { } <START_BUG> IVariableBinding resolveMember ( AnnotationTypeMemberDeclaration member ) { <END_BUG> return null ; } ITypeBinding resolveExpressionType ( Expression expression ) { } IVariableBinding resolveField ( FieldAccess fieldAccess ) { } IVariableBinding resolveField ( SuperFieldAccess fieldAccess ) { } IBinding resolveImport ( ImportDeclaration importDeclaration ) { } IPackageBinding resolvePackage ( PackageDeclaration pkg ) { } IMethodBinding resolveConstructor ( ConstructorInvocation expression ) { } IMethodBinding resolveConstructor ( SuperConstructorInvocation expression ) { } IMethodBinding resolveConstructor ( ClassInstanceCreation expression ) { } IBinding resolveReference ( MemberRef ref ) { } IBinding resolveReference ( MethodRef ref ) { } ASTNode findDeclaringNode ( IBinding binding ) { } ASTNode findDeclaringNode ( String bindingKey ) { } ITypeBinding getTypeBinding ( TypeBinding referenceBinding ) { } IPackageBinding getPackageBinding ( PackageBinding packageBinding ) { } IMethodBinding getMethodBinding ( MethodBinding methodBinding ) { } IVariableBinding getVariableBinding ( VariableBinding binding ) { } void updateKey ( ASTNode node , ASTNode newNode ) { } org . eclipse . jdt . internal . compiler . ast . ASTNode getCorrespondingNode ( ASTNode currentNode ) { } void recordScope ( ASTNode astNode , BlockScope blockScope ) { } }

Fix:
IMethodBinding resolveMember ( AnnotationTypeMemberDeclaration member ) {
Buggy code:
public class RemoveTest extends CleanupHelper { StorageService ss = StorageService . instance ; TokenMetadata tmd = ss . getTokenMetadata ( ) ; IPartitioner oldPartitioner ; ArrayList < Token > endpointTokens = new ArrayList < Token > ( ) ; ArrayList < Token > keyTokens = new ArrayList < Token > ( ) ; List < InetAddress > hosts = new ArrayList < InetAddress > ( ) ; InetAddress removalhost ; Token removaltoken ; @ Before public void setup ( ) throws IOException , ConfigurationException { } @ After public void tearDown ( ) { } @ Test ( expected = UnsupportedOperationException . class ) public void testBadToken ( ) { } @ Test ( expected = UnsupportedOperationException . class ) public void testLocalToken ( ) { } @ Test public void testRemoveToken ( ) throws InterruptedException { } @ Test public void testStartRemoving ( ) { } @ Test public void testFinishRemoving ( ) { } class ReplicationSink implements IMessageSink { public Message handleMessage ( Message msg , InetAddress to ) { if ( ! ( msg . getVerb ( ) . equals ( STREAM_REQUEST ) ) ) return msg ; StreamUtil . finishStreamRequest ( msg , to ) ; return null ; } } class NotificationSink implements IMessageSink { public int callCount = 0 ; public Message handleMessage ( Message msg , InetAddress to ) { if ( msg . getVerb ( ) . equals ( REPLICATION_FINISHED ) ) { ( callCount ) ++ ; assertEquals ( MISC , msg . getMessageType ( ) ) ; <START_BUG> Message response = msg . getReply ( FBUtilities . getLocalAddress ( ) , new byte [ ] { } ) ; <END_BUG> MessagingService . instance ( ) . sendOneWay ( response , FBUtilities . getLocalAddress ( ) ) ; return null ; } else { return msg ; } } } }

Fix:
Message response = msg . getReply ( FBUtilities . getLocalAddress ( ) , new byte [ ] { } , msg . getVersion ( ) ) ;
Buggy code:
public class StompSubProtocolHandler implements ApplicationEventPublisherAware , SubProtocolHandler { public static final int MINIMUM_WEBSOCKET_MESSAGE_SIZE = ( 16 * 1024 ) + 256 ; public static final String CONNECTED_USER_HEADER = "user-name" ; private static final Log logger = LogFactory . getLog ( StompSubProtocolHandler . class ) ; private int messageSizeLimit = 64 * 1024 ; private final Map < String , BufferingStompDecoder > decoders = new ConcurrentHashMap < String , BufferingStompDecoder > ( ) ; private final StompEncoder stompEncoder = new StompEncoder ( ) ; private UserSessionRegistry userSessionRegistry ; private ApplicationEventPublisher eventPublisher ; public void setMessageSizeLimit ( int messageSizeLimit ) { } public int getMessageSizeLimit ( ) { } public void setUserSessionRegistry ( UserSessionRegistry registry ) { } public UserSessionRegistry getUserSessionRegistry ( ) { } @ Override public List < String > getSupportedProtocols ( ) { } @ Override public void setApplicationEventPublisher ( ApplicationEventPublisher applicationEventPublisher ) { } public void handleMessageFromClient ( WebSocketSession session , WebSocketMessage < ? > webSocketMessage , MessageChannel outputChannel ) { } private void publishEvent ( ApplicationEvent event ) { try { this . eventPublisher . publishEvent ( event ) ; } catch ( Throwable ex ) { <START_BUG> StompSubProtocolHandler . logger . error ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>publish<seq2seq4repair_space>event<seq2seq4repair_space>" + event ) , ex ) ; <END_BUG> } } protected void sendErrorMessage ( WebSocketSession session , Throwable error ) { } @ SuppressWarnings ( "unchecked" ) @ Override public void handleMessageToClient ( WebSocketSession session , Message < ? > message ) { } private String getVersion ( StompHeaderAccessor connectAckHeaders ) { } private void afterStompSessionConnected ( StompHeaderAccessor headers , WebSocketSession session ) { } private String resolveNameForUserSessionRegistry ( Principal principal ) { } @ Override public String resolveSessionId ( Message < ? > message ) { } @ Override public void afterSessionStarted ( WebSocketSession session , MessageChannel outputChannel ) { } @ Override public void afterSessionEnded ( WebSocketSession session , CloseStatus closeStatus , MessageChannel outputChannel ) { } }

Fix:
StompSubProtocolHandler . logger . error ( ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>publishing<seq2seq4repair_space>" + event ) , ex ) ;
Buggy code:
public class SetClasspathOperation extends ChangeClasspathOperation { IClasspathEntry [ ] newRawClasspath ; IClasspathEntry [ ] referencedEntries ; IPath newOutputLocation ; JavaProject project ; public SetClasspathOperation ( JavaProject project , IClasspathEntry [ ] newRawClasspath , IPath newOutputLocation , boolean canChangeResource ) { } public SetClasspathOperation ( JavaProject project , IClasspathEntry [ ] newRawClasspath , IClasspathEntry [ ] referencedEntries , IPath newOutputLocation , boolean canChangeResource ) { } protected void executeOperation ( ) throws JavaModelException { checkCanceled ( ) ; try { JavaModelManager . PerProjectInfo perProjectInfo = this . project . getPerProjectInfo ( ) ; ClasspathChange classpathChange = perProjectInfo . setRawClasspath ( this . newRawClasspath , this . referencedEntries , this . newOutputLocation , JavaModelStatus . VERIFIED_OK ) ; <START_BUG> classpathChanged ( classpathChange ) ; <END_BUG> if ( ( this . canChangeResources ) && ( perProjectInfo . writeAndCacheClasspath ( this . project , this . newRawClasspath , this . newOutputLocation ) ) ) JavaModelOperation . setAttribute ( JavaModelOperation . HAS_MODIFIED_RESOURCE_ATTR , JavaModelOperation . TRUE ) ; } finally { done ( ) ; } } protected ISchedulingRule getSchedulingRule ( ) { } public String toString ( ) { } public IJavaModelStatus verify ( ) { } }

Fix:
classpathChanged ( classpathChange , true ) ;
Buggy code:
public class Clinit extends AbstractMethodDeclaration { private static int ENUM_CONSTANTS_THRESHOLD = 2000 ; private FieldBinding assertionSyntheticFieldBinding = null ; private FieldBinding classLiteralSyntheticField = null ; public Clinit ( CompilationResult compilationResult ) { } public void analyseCode ( ClassScope classScope , InitializationFlowContext staticInitializerFlowContext , FlowInfo flowInfo ) { if ( this . ignoreFurtherInvestigation ) return ; try { ExceptionHandlingFlowContext clinitContext = new ExceptionHandlingFlowContext ( staticInitializerFlowContext . parent , this , Binding . NO_EXCEPTIONS , staticInitializerFlowContext , this . scope , FlowInfo . DEAD_END ) ; <START_BUG> if ( ( ( flowInfo . tagBits ) & ( FlowInfo . UNREACHABLE ) ) == 0 ) { <END_BUG> this . bits |= ASTNode . NeedFreeReturn ; } flowInfo = flowInfo . mergedWith ( staticInitializerFlowContext . initsOnReturn ) ; FieldBinding [ ] fields = this . scope . enclosingSourceType ( ) . fields ( ) ; for ( int i = 0 , count = fields . length ; i < count ; i ++ ) { FieldBinding field ; if ( ( ( ( field = fields [ i ] ) . isStatic ( ) ) && ( field . isFinal ( ) ) ) && ( ! ( flowInfo . isDefinitelyAssigned ( fields [ i ] ) ) ) ) { this . scope . problemReporter ( ) . uninitializedBlankFinalField ( field , this . scope . referenceType ( ) . declarationOf ( field . original ( ) ) ) ; } } staticInitializerFlowContext . checkInitializerExceptions ( this . scope , clinitContext , flowInfo ) ; } catch ( org . eclipse . jdt . internal . compiler . problem . AbortMethod e ) { this . ignoreFurtherInvestigation = true ; } } public void generateCode ( ClassScope classScope , ClassFile classFile ) { } private void generateCode ( ClassScope classScope , ClassFile classFile , int clinitOffset ) { } public boolean isClinit ( ) { } public boolean isInitializationMethod ( ) { } public boolean isStatic ( ) { } public void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public StringBuffer print ( int tab , StringBuffer output ) { } public void resolve ( ClassScope classScope ) { } public void traverse ( ASTVisitor visitor , ClassScope classScope ) { } public void setAssertionSupport ( FieldBinding assertionSyntheticFieldBinding , boolean needClassLiteralField ) { } }

Fix:
if ( ( ( flowInfo . tagBits ) & ( FlowInfo . UNREACHABLE_OR_DEAD ) ) == 0 ) {
Buggy code:
public abstract class AbstractProxyManager implements ProxyManager { public final Object createDelegatingProxy ( Bundle clientBundle , Collection < Class < ? > > classes , Callable < Object > dispatcher , Object template ) throws UnableToProxyException { } public Object createInterceptingProxy ( Bundle clientBundle , Collection < Class < ? > > classes , Object delegate , InvocationListener listener ) throws UnableToProxyException { } public final Object createDelegatingInterceptingProxy ( Bundle clientBundle , Collection < Class < ? > > classes , Callable < Object > dispatcher , Object template , InvocationListener listener ) throws UnableToProxyException { } public final Callable < Object > unwrap ( Object proxy ) { } public final boolean isProxy ( Object proxy ) { } protected abstract Object createNewProxy ( Bundle clientBundle , Collection < Class < ? > > classes , Callable < Object > dispatcher , InvocationListener listener ) throws UnableToProxyException { } protected abstract InvocationHandler getInvocationHandler ( Object proxy ) { } protected abstract boolean isProxyClass ( Class < ? > clazz ) { } protected synchronized ClassLoader getClassLoader ( final Bundle clientBundle , Collection < Class < ? > > classes ) { <START_BUG> if ( ( clientBundle . getState ( ) ) == ( Bundle . UNINSTALLED ) ) { <END_BUG> throw new IllegalStateException ( MESSAGES . getMessage ( "bundle.uninstalled" , clientBundle . getSymbolicName ( ) , clientBundle . getVersion ( ) , clientBundle . getBundleId ( ) ) ) ; } ClassLoader cl = null ; if ( ( classes . size ( ) ) == 1 ) cl = classes . iterator ( ) . next ( ) . getClassLoader ( ) ; if ( cl == null ) { cl = AriesFrameworkUtil . getClassLoaderForced ( clientBundle ) ; } return cl ; } private Object duplicateProxy ( Collection < Class < ? > > classes , Callable < Object > dispatcher , Object template , InvocationListener listener ) { } }

Fix:
if ( ( clientBundle != null ) && ( ( clientBundle . getState ( ) ) == ( Bundle . UNINSTALLED ) ) ) {
Buggy code:
@ SuppressLint ( "SimpleDateFormat" ) public class LoadSaveOps { public static String userDir = PreferenceManager . getDefaultSharedPreferences ( OnlyContext . getContext ( ) ) . getString ( "user_dir" , "WindNow" ) ; private static File localDir = new File ( ( ( ( Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) ) + "//" ) + ( LoadSaveOps . userDir ) ) ) ; private static File stationsFile = new File ( ( ( ( ( ( Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) ) + "//" ) + ( LoadSaveOps . userDir ) ) + "//" ) + "stations.txt" ) ) ; private static File errorLogFile = new File ( ( ( ( ( ( Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) ) + "//" ) + ( LoadSaveOps . userDir ) ) + "//" ) + "errorlog.txt" ) ) ; private static String sep = ";" ; public static ArrayList < Station > loadStations ( ) { ArrayList < Station > stations = new ArrayList < Station > ( ) ; try { LoadSaveOps . mkLocalDir ( ) ; BufferedReader br = null ; boolean saveFile = ! ( LoadSaveOps . stationsFile . exists ( ) ) ; if ( saveFile ) { AssetManager assetManager = OnlyContext . getContext ( ) . getAssets ( ) ; br = new BufferedReader ( new InputStreamReader ( assetManager . open ( "stations.txt" ) ) ) ; } else { br = new BufferedReader ( new FileReader ( LoadSaveOps . stationsFile ) ) ; } String line ; while ( ( line = br . readLine ( ) ) != null ) { String [ ] arr = line . split ( LoadSaveOps . sep ) ; if ( ( arr . length ) > 1 ) stations . add ( new Station ( arr [ 0 ] , arr [ 1 ] ) ) ; } br . close ( ) ; if ( saveFile ) { LoadSaveOps . saveStations ( stations ) ; } <START_BUG> } catch ( IOException e ) { <END_BUG> LoadSaveOps . printErrorToLog ( e ) ; } return stations ; } public static void saveStations ( ArrayList < Station > stations ) { } static void printErrorToLog ( Exception e ) { } private static void mkLocalDir ( ) { } }

Fix:
} catch ( Exception e ) {
Buggy code:
public class TranslatingTask extends AsyncTask < String , String , String > { private final TextView outputTextView ; private final Context context ; private final ProgressDialog pd ; public TranslatingTask ( Context context , TextView outputTextView , ProgressDialog pd ) { } @ Override protected String doInBackground ( String ... params ) { List < FlickrFarm > farms = FlickrIpResolver . find ( ) ; if ( farms != null ) { StringBuilder sb = new StringBuilder ( ) ; for ( FlickrFarm farm : farms ) { <START_BUG> sb . append ( String . format ( "%s<seq2seq4repair_space>%s%n" , farm . getGlobalHostName ( ) , farm . getEastHostIp ( ) ) ) ; <END_BUG> } return sb . toString ( ) ; } else { return context . getText ( error_info ) . toString ( ) ; } } @ Override protected void onPostExecute ( String s ) { } }

Fix:
sb . append ( String . format ( "%s<seq2seq4repair_space>%s%n" , farm . getEastHostIp ( ) , farm . getGlobalHostName ( ) ) ) ;
Buggy code:
@ Component ( "sysUserService" ) public class SysUserServiceImpl implements SysUserService { @ Resource private SysUserMapper sysUserMapper ; @ Resource private SysCompanyMapper sysCompanyMapper ; @ Resource private SysLoginRememberMapper sysLoginRememberMapper ; @ Override public SessionUser doLogin ( SysUser user ) throws ServiceException { } @ Override public SessionUser doRegist ( SysUser user , SysCompany company , String passwordRepeat , Integer accept ) throws ServiceException { if ( ( accept == null ) || ( ( accept . intValue ( ) ) != ( SysUser . ACCEPT_TRUE ) ) ) { throw new ServiceException ( "e.regist" ) ; } if ( user == null ) { throw new ServiceException ( "e.regist" ) ; } if ( ( StringUtils . isEmpty ( passwordRepeat ) ) || ( ! ( passwordRepeat . equals ( user . getPassword ( ) ) ) ) ) { throw new ServiceException ( "e.regist" ) ; } <START_BUG> if ( ! ( reservedAccount ( user . getAccount ( ) ) ) ) { <END_BUG> throw new ServiceException ( "e.regist.exist.account" ) ; } String rebuildedAccount = rebuildAccount ( classifyOfAccount ( user . getAccount ( ) ) , user . getAccount ( ) ) ; if ( existAccount ( rebuildedAccount ) ) { throw new ServiceException ( "e.regist.exist.account" ) ; } sysCompanyMapper . insert ( company ) ; if ( ( ( company . getId ( ) ) == null ) || ( ( company . getId ( ) . intValue ( ) ) == 0 ) ) { throw new ServiceException ( "e.regist" ) ; } SysUser registUser = saveAccount ( user , company . getId ( ) , rebuildedAccount ) ; return new SessionUser ( registUser . getId ( ) , user . getAccount ( ) , company . getId ( ) ) ; } static final Set < String > RESERVED_AC = new HashSet < String > ( ) ; private boolean reservedAccount ( String account ) { } private SysUser saveAccount ( SysUser user , Integer cid , String rebuildedAccount ) throws ServiceException { } @ Override public String classifyOfAccount ( String account ) { } private String encodePassword ( String password , String salt ) { } private String randomSalt ( ) { } @ Override public String rebuildAccount ( String classify , String account ) { } @ Override public Integer registNewAccount ( SysUser user , String passwordRepeat ) throws ServiceException { } @ Override public void rememberMe ( HttpServletResponse response , SessionUser user , Integer rememberFlag ) { } @ Override public Integer queryIdByAccount ( String account ) { } private boolean existAccount ( String account ) { } @ Override public void doResetPassword ( Integer uid , String origin , String password , String confirm ) throws ServiceException { } @ Override public Pager < SysUser > pager ( SysUserCond cond , Pager < SysUser > pager ) { } @ Override public SysUser doRegistByCompany ( String mainAccount , Integer cid , String account , String password , String confirm ) throws ServiceException { } @ Override public Integer doCountUserOfCompany ( Integer cid , Boolean withMainUser ) { } @ Override public List < SysUser > excludeMainAccount ( List < SysUser > userList ) { } @ Override public void doResetPasswordByAdmin ( Integer adminUid , Integer uid , String password , String confirm ) throws ServiceException { } }

Fix:
if ( reservedAccount ( user . getAccount ( ) ) ) {
Buggy code:
public class TableUpdater { protected static List list = new Vector ( ) ; public static void tableChanged ( TableModelChangedEvent ev ) throws Exception { } <START_BUG> public static void add ( TableOwnerInterface frameController ) { <END_BUG> TableUpdater . list . add ( frameController ) ; } }

Fix:
public static void add ( TableOwner frameController ) {
Buggy code:
public class KernelDeploymentModuleProcessor implements DeploymentUnitProcessor { private ModuleIdentifier POJO_MODULE = ModuleIdentifier . create ( "org.jboss.as.pojo" ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit unit = phaseContext . getDeploymentUnit ( ) ; final List < KernelDeploymentXmlDescriptor > kdXmlDescriptors = unit . getAttachment ( ATTACHMENT_KEY ) ; if ( ( kdXmlDescriptors == null ) || ( kdXmlDescriptors . isEmpty ( ) ) ) return ; for ( KernelDeploymentXmlDescriptor kdxd : kdXmlDescriptors ) { if ( ( kdxd . getBeanFactoriesCount ( ) ) > 0 ) { final ModuleSpecification moduleSpecification = unit . getAttachment ( MODULE_SPECIFICATION ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; <START_BUG> ModuleDependency dependency = new ModuleDependency ( moduleLoader , POJO_MODULE , false , false , false ) ; <END_BUG> PathFilter filter = PathFilters . isChildOf ( BaseBeanFactory . class . getPackage ( ) . getName ( ) ) ; dependency . addImportFilter ( filter , true ) ; dependency . addImportFilter ( PathFilters . rejectAll ( ) , false ) ; moduleSpecification . addSystemDependency ( dependency ) ; return ; } } } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
ModuleDependency dependency = new ModuleDependency ( moduleLoader , POJO_MODULE , false , false , false , false ) ;
Buggy code:
public class Activator implements BundleActivator { private static final String HAZELCAST_OSGI_START = "hazelcast.osgi.start" ; private static final ILogger LOGGER = Logger . getLogger ( Activator . class ) ; private HazelcastInstance hazelcastInstance ; @ Override public void start ( BundleContext context ) throws Exception { } @ Override public void stop ( BundleContext context ) throws Exception { } private void activateJavaxScripting ( BundleContext context ) throws Exception { if ( ! ( isJavaxScriptingAvailable ( ) ) ) { Activator . LOGGER . warning ( "javax.scripting<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available,<seq2seq4repair_space>scripts<seq2seq4repair_space>from<seq2seq4repair_space>Management<seq2seq4repair_space>Center<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>executed!" ) ; return ; } <START_BUG> Class < ? > clazz = context . getBundle ( ) . loadClass ( "com.hazelcast.osgi.ScriptEngineActivator" ) ; <END_BUG> Method register = clazz . getDeclaredMethod ( "registerOsgiScriptEngineManager" , BundleContext . class ) ; register . invoke ( clazz , context ) ; } private boolean isJavaxScriptingAvailable ( ) { } }

Fix:
Class < ? > clazz = context . getBundle ( ) . loadClass ( "com.hazelcast.internal.osgi.ScriptEngineActivator" ) ;
Buggy code:
public class CoolItem extends Item { CoolBar parent ; Control control ; int id ; boolean ideal ; boolean minimum ; public CoolItem ( CoolBar parent , int style ) { } public CoolItem ( CoolBar parent , int style , int index ) { } public void addSelectionListener ( SelectionListener listener ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint ) { } public Rectangle getBounds ( ) { } Rectangle getClientArea ( ) { } public Control getControl ( ) { } public CoolBar getParent ( ) { } void releaseChild ( ) { } void releaseWidget ( ) { } public void setControl ( Control control ) { } public Point getPreferredSize ( ) { checkWidget ( ) ; int index = parent . indexOf ( this ) ; if ( index == ( - 1 ) ) return new Point ( 0 , 0 ) ; int hwnd = parent . handle ; REBARBANDINFO rbBand = new REBARBANDINFO ( ) ; rbBand . cbSize = REBARBANDINFO . sizeof ; rbBand . fMask = ( OS . RBBIM_CHILDSIZE ) | ( OS . RBBIM_IDEALSIZE ) ; OS . SendMessage ( hwnd , RB_GETBANDINFO , index , rbBand ) ; int width = ( rbBand . cxIdeal ) + ( parent . getMargin ( index ) ) ; <START_BUG> return new Point ( width , rbBand . cyMinChild ) ; <END_BUG> } public void setPreferredSize ( int width , int height ) { } public void setPreferredSize ( Point size ) { } public Point getSize ( ) { } public void setSize ( int width , int height ) { } public void setSize ( Point size ) { } public Point getMinimumSize ( ) { } public void setMinimumSize ( int width , int height ) { } public void setMinimumSize ( Point size ) { } boolean getWrap ( ) { } void setWrap ( boolean wrap ) { } public void removeSelectionListener ( SelectionListener listener ) { } }

Fix:
return new Point ( width , rbBand . cyMaxChild ) ;
Buggy code:
@ Tps ( nbhours = 3 ) public class PokemonCombat implements Comparable < PokemonCombat > { protected Pkm pkm ; protected boolean isIA ; protected int listeIndice ; protected PokemonCombat [ ] equipe ; protected Object prop ; protected Stack < Pkm > XpStack ; protected PokemonCombat [ ] adv ; protected PokemonCombat [ ] voisins ; public PokemonCombat ( Pkm p , boolean isIA , Object j ) { } public Pkm getPkm ( ) { } public boolean isIA ( ) { } public int compareTo ( PokemonCombat p ) { } public void action ( PokemonCombat cible , Combat context ) { if ( ! ( isIA ) ) { context . action ( this , cible ) ; } else { context . ajoutBuffer ( "Tour<seq2seq4repair_space>de<seq2seq4repair_space>l'IA" ) ; int ind = 0 ; switch ( pkm . IAbh ) { case 1 : ind = bestdmg ( cible , context ) ; break ; case 2 : ind = this . bestdot ( cible , context ) ; break ; case 3 : ind = this . bestControl ( cible , context ) ; break ; default : <START_BUG> ind = 0 ; <END_BUG> break ; } pkm . cap . utiliser ( ind , pkm , cible . pkm , context ) ; if ( ( pkm . stats [ 2 ] [ 0 ] ) <= 0 ) { XPreward ( context ) ; context . pokeswap ( this ) ; } if ( ( cible . pkm . stats [ 2 ] [ 0 ] ) <= 0 ) { cible . XPreward ( context ) ; context . pokeswap ( cible ) ; } if ( ( ( pkm . stats [ 2 ] [ 0 ] ) <= ( ( int ) ( ( pkm . stats [ 2 ] [ 1 ] ) // 2 ) ) ) && ( ( cible . pkm . statut ) != ( Statut . KO ) ) ) { if ( ( ( pkm . objTenu ) instanceof Medicament ) && ( ( cible . pkm . objTenu ) != null ) ) { Medicament m = ( ( Medicament ) ( pkm . objTenu ) ) ; context . ajoutBuffer ( ( ( pkm . nom ) + "<seq2seq4repair_space>utilise<seq2seq4repair_space>sa<seq2seq4repair_space>baie" ) ) ; if ( m . baie ) { m . script ( pkm , context ) ; pkm . objTenu = null ; } } } if ( ( ( cible . pkm . stats [ 2 ] [ 0 ] ) <= ( ( int ) ( ( cible . pkm . stats [ 2 ] [ 1 ] ) // 2 ) ) ) && ( ( cible . pkm . statut ) != ( Statut . KO ) ) ) { if ( ( ( cible . pkm . objTenu ) instanceof Medicament ) && ( ( cible . pkm . objTenu ) != null ) ) { Medicament m = ( ( Medicament ) ( cible . pkm . objTenu ) ) ; context . ajoutBuffer ( ( ( cible . pkm . nom ) + "<seq2seq4repair_space>utilise<seq2seq4repair_space>sa<seq2seq4repair_space>baie" ) ) ; if ( m . baie ) { m . script ( cible . pkm , context ) ; cible . pkm . objTenu = null ; } } } } context . setBufferState ( true ) ; context . setfreeze ( true ) ; } public int bestdmg ( PokemonCombat cible , Combat context ) { } public int dotScore ( Capacite c , Pkm user , Pkm cible ) { } public int bestdot ( PokemonCombat cible , Combat context ) { } public int controlScore ( Capacite c , Pkm user , Pkm cible ) { } public int bestControl ( PokemonCombat cible , Combat context ) { } public void setPokemon ( Pkm p ) { } public void XPreward ( Combat context ) { } }

Fix:
ind = bestdmg ( cible , context ) ;
Buggy code:
public class TestMultiFieldQueryParser extends BaseTokenStreamTestCase { public void tesStopwordsParsing ( ) throws Exception { } private void assertStopQueryEquals ( String qtxt , String expectedRes ) throws Exception { } public void testSimple ( ) throws Exception { } public void testBoostsSimple ( ) throws Exception { } public void testStaticMethod1 ( ) throws ParseException { } public void testStaticMethod2 ( ) throws ParseException { } public void testStaticMethod2Old ( ) throws ParseException { } public void testStaticMethod3 ( ) throws ParseException { } public void testStaticMethod3Old ( ) throws ParseException { } public void testAnalyzerReturningNull ( ) throws ParseException { } public void testStopWordSearching ( ) throws Exception { Analyzer analyzer = new StandardAnalyzer ( ) ; Directory ramDir = new RAMDirectory ( ) ; IndexWriter iw = new IndexWriter ( ramDir , analyzer , true , MaxFieldLength . LIMITED ) ; Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "body" , "blah<seq2seq4repair_space>the<seq2seq4repair_space>footest<seq2seq4repair_space>blah" , Store . NO , Index . ANALYZED ) ) ; iw . addDocument ( doc ) ; iw . close ( ) ; MultiFieldQueryParser mfqp = new MultiFieldQueryParser ( new String [ ] { "body" } , analyzer ) ; mfqp . setDefaultOperator ( AND ) ; Query q = mfqp . parse ( "the<seq2seq4repair_space>footest" ) ; <START_BUG> IndexSearcher is = new IndexSearcher ( ramDir ) ; <END_BUG> ScoreDoc [ ] hits = is . search ( q , null , 1000 ) . scoreDocs ; assertEquals ( 1 , hits . length ) ; is . close ( ) ; } private static class AnalyzerReturningNull extends Analyzer { StandardAnalyzer stdAnalyzer = new StandardAnalyzer ( ) ; public AnalyzerReturningNull ( ) { } public TokenStream tokenStream ( String fieldName , Reader reader ) { } private static class EmptyTokenStream extends TokenStream { public boolean incrementToken ( ) throws IOException { } } } }

Fix:
IndexSearcher is = new IndexSearcher ( ramDir , true ) ;
Buggy code:
public class ProductGroupManagerClient extends RestServiceClientBase implements IProductGroupManagerClient { public ProductGroupManagerClient ( ) { } @ Override public void search ( String searchText , int pageNumber , int productsPerPage , boolean needCategory , Action_1 < BookBlockPLVM > todoWithResponse , Action_1 < HttpResponse > todoIfResponseFailed ) { <START_BUG> Request < BookBlockPLVM > request = new Request ( BookBlockPLVM . class , 3 ) ; <END_BUG> request . requestUrl = ( baseAddress ) + "//Search" ; request . todoWithResponse = todoWithResponse ; request . todoIfResponseFailed = todoIfResponseFailed ; request . requestData . put ( "searchText" , searchText ) ; request . requestData . put ( "pageNumber" , pageNumber ) ; request . requestData . put ( "productsPerPage" , productsPerPage ) ; request . requestData . put ( "needCategory" , needCategory ) ; sendRequest ( request ) ; } }

Fix:
Request < BookBlockPLVM > request = new Request ( BookBlockPLVM . class , 4 ) ;
Buggy code:
@ RunWith ( SpringJUnit4ClassRunner . class ) @ ContextConfiguration ( "//org//springframework//data//hadoop//pig//basic.xml" ) public class PigTest { @ Autowired private PigServer pig ; @ Autowired private ApplicationContext ctx ; @ After public void cleanup ( ) throws Exception { } @ Test public void testPig ( ) throws Exception { } @ Test public void testServerNamespace ( ) throws Exception { <START_BUG> String defaultName = "hadoop-pig-server" ; <END_BUG> assertTrue ( ctx . containsBean ( defaultName ) ) ; PigServer server = ctx . getBean ( defaultName , PigServer . class ) ; Properties props = server . getPigContext ( ) . getProperties ( ) ; assertEquals ( "blue" , props . get ( "ivy" ) ) ; assertEquals ( LOCAL , server . getPigContext ( ) . getExecType ( ) ) ; } }

Fix:
String defaultName = "pig" ;
Buggy code:
public class BcelRenderer implements IExprVisitor , ITestVisitor { private InstructionList instructions ; private InstructionFactory fact ; private BcelWorld world ; InstructionHandle sk ; InstructionHandle fk ; InstructionHandle next = null ; private BcelRenderer ( InstructionFactory fact , BcelWorld world ) { } public static InstructionList renderExpr ( InstructionFactory fact , BcelWorld world , Expr e ) { } public static InstructionList renderExpr ( InstructionFactory fact , BcelWorld world , Expr e , Type desiredType ) { } public static InstructionList renderExprs ( InstructionFactory fact , BcelWorld world , Expr [ ] es ) { } public static InstructionList renderTest ( InstructionFactory fact , BcelWorld world , Test e , InstructionHandle sk , InstructionHandle fk , InstructionHandle next ) { } public static InstructionList renderTest ( InstructionFactory fact , BcelWorld world , Test e , InstructionHandle sk , InstructionHandle fk ) { } private void recur ( Test e , InstructionHandle sk , InstructionHandle fk , InstructionHandle next ) { } public void visit ( And e ) { } public void visit ( Or e ) { } public void visit ( Not e ) { } public void visit ( Instanceof i ) { } public void visit ( HasAnnotation hasAnnotation ) { InstructionList il = new InstructionList ( ) ; Member getClass = Member . method ( OBJECT , 0 , "getClass" , "()Ljava//lang//Class;" ) ; il . append ( Utility . createInvoke ( fact , world , getClass ) ) ; int annClassIndex = fact . getConstantPool ( ) . addClass ( hasAnnotation . getAnnotationType ( ) . getSignature ( ) ) ; il . append ( new LDC_W ( annClassIndex ) ) ; <START_BUG> Member isAnnotationPresent = Member . method ( TypeX . forName ( "Ljava//lang//Class" ) , 0 , "isAnnotationPresent" , "(Ljava//lang//Class;)Z" ) ; <END_BUG> il . append ( Utility . createInvoke ( fact , world , isAnnotationPresent ) ) ; il . append ( createJumpBasedOnBooleanOnStack ( ) ) ; instructions . insert ( il ) ; hasAnnotation . getVar ( ) . accept ( this ) ; } private InstructionList createJumpBasedOnBooleanOnStack ( ) { } public void visit ( Literal literal ) { } public void visit ( Call call ) { } public void visit ( FieldGetCall fieldGetCall ) { } public void visit ( Var var ) { } public void visit ( FieldGet fieldGet ) { } public void visit ( CallExpr call ) { } }

Fix:
Member isAnnotationPresent = Member . method ( TypeX . forName ( "java//lang//Class" ) , 0 , "isAnnotationPresent" , "(Ljava//lang//Class;)Z" ) ;
Buggy code:
abstract class AbstractOptionsDialog < P , R extends Registration > extends StatusDialog { private P preferences ; private R registration ; Map < String , Object > map ; CheckboxTableViewer tableViewer ; MapEntryDialog < String , Object > entryDialog ; Button addButton ; Button updateButton ; Button removeButton ; Button restoreButton ; AbstractOptionsDialog ( final Shell parent ) { } abstract String name ( ) { } @ Override protected final Control createDialogArea ( final Composite parent ) { } final Map < String , Object > knownOptions ( ) { } final Map < String , Object > unknownOptions ( ) { } final Map < String , Object > inheritedOptions ( ) { } final Map < String , Object > customOptions ( ) { } final void updateButtons ( ) { } final void updateTable ( ) { } final void sortTable ( ) { } class LocalMapTableSorter extends MapTableSorter < String , Object > { LocalMapTableSorter ( final Table table , @ Nullable final Comparator < Map . Entry < String , Object > > comparator ) { } @ Override final Map < String , Object > loadMap ( ) { } @ Override final void updateMap ( final Map < String , Object > map ) { } } abstract P defaultPreferences ( ) { } abstract Options options ( P preferences , R registration ) { } private void openOptionDialog ( final Map . Entry < String , Object > entry ) { MapEntryDialog < String , Object > dialog = this . entryDialog ; dialog . setEntry ( entry ) ; dialog . open ( ) ; if ( ( dialog . getReturnCode ( ) ) == ( Window . OK ) ) { Map . Entry < String , Object > result = this . entryDialog . getEntry ( ) ; <START_BUG> if ( entry != null ) { <END_BUG> this . map . put ( result . getKey ( ) , result . getValue ( ) ) ; this . updateTable ( ) ; this . sortTable ( ) ; this . updateButtons ( ) ; } } } void performAdd ( ) { } void performUpdate ( ) { } void performRemove ( ) { } void performRestore ( ) { } final void configure ( ) { } abstract void apply ( ) { } abstract void load ( P preferences , R registration ) { } private void applyInternal ( ) { } private void loadInternal ( final P preferences , final R registration ) { } final void updateStatusBy ( final Registrable registrable ) { } static final < K > Map < K , Options > updateData ( final Map < K , Options > data , final K key , final Options options ) { } static final Map < String , Object > readFromOptions ( final Options ... options ) { } static final Options writeToOptions ( @ Nullable final Options options , final Map < String , Object > map ) { } final void setPreferences ( final P preferences ) { } final void setRegistration ( final R registration ) { } final P getPreferences ( ) { } final R getRegistration ( ) { } @ Override protected IDialogSettings getDialogBoundsSettings ( ) { } @ Override public boolean isHelpAvailable ( ) { } @ Override protected boolean isResizable ( ) { } }

Fix:
if ( result != null ) {
Buggy code:
@ RunWith ( Arquillian . class ) public class OSGiWebAppTestCase { @ Inject public BundleContext context ; @ Inject public Bundle bundle ; @ Deployment @ StartLevelAware ( startLevel = 4 ) public static WebArchive createdeployment ( ) { final WebArchive archive = ShrinkWrap . create ( WebArchive . class , "example-webapp" ) ; <START_BUG> archive . addClasses ( OSGiTestSupport . class , EndpointServlet . class ) ; <END_BUG> archive . addAsWebResource ( "osgi//webapp//message.txt" , "message.txt" ) ; archive . addAsWebInfResource ( "osgi//webapp//webA.xml" , "web.xml" ) ; archive . add ( new Asset ( ) { public InputStream openStream ( ) { OSGiManifestBuilder builder = OSGiManifestBuilder . newInstance ( ) ; builder . addBundleSymbolicName ( archive . getName ( ) ) ; builder . addBundleManifestVersion ( 2 ) ; builder . addManifestHeader ( Constants . BUNDLE_CLASSPATH , ".,WEB-INF//classes" ) ; builder . addManifestHeader ( "Web-ContextPath" , "example-webapp" ) ; builder . addImportPackages ( StartLevel . class , HttpServlet . class , Servlet . class ) ; return builder . openStream ( ) ; } } , JarFile . MANIFEST_NAME ) ; return archive ; } @ Test public void testServletAccess ( ) throws Exception { } @ Test public void testServletInitProps ( ) throws Exception { } @ Test public void testResourceAccess ( ) throws Exception { } private String getHttpResponse ( String reqPath , int timeout ) throws IOException { } }

Fix:
archive . addClasses ( HttpTestSupport . class , OSGiTestSupport . class , EndpointServlet . class ) ;
Buggy code:
public class XMLSerializationProvider implements ISerializationProvider < Document , Element > { private final ConverterRegistry converterRegistry ; public XMLSerializationProvider ( ) { } public XMLSerializationProvider ( ConverterRegistry pConverterRegistry ) { } public static String toString ( Document pDocument ) throws TransformerException { } public static Document toDocument ( String pXmlString ) throws IOException , ParserConfigurationException , SAXException { DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; factory . setNamespaceAware ( true ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; <START_BUG> return builder . parse ( new ByteArrayInputStream ( pXmlString . getBytes ( ) ) ) ; <END_BUG> } @ Nonnull @ Override public Document serializeRootNode ( @ Nonnull String pName , @ Nonnull Class < ? extends IPropertyPitProvider > pPropertyType , @ Nonnull IChildRunner < Element > pChildRunner ) { } @ Override public void serializeFixedNode ( @ Nonnull Element pParentOutputData , @ Nonnull String pName , @ Nonnull IChildRunner < Element > pChildRunner ) { } @ Override public void serializeFixedNode ( @ Nonnull Element pParentOutputData , @ Nonnull String pName , @ Nonnull Class < ? extends IPropertyPitProvider > pType , @ Nonnull IChildRunner < Element > pChildRunner ) { } @ Override public void serializeDynamicNode ( @ Nonnull Element pParentOutputData , @ Nonnull String pName , @ Nonnull Class < ? extends IPropertyPitProvider > pPropertyType , @ Nullable List < ? extends Annotation > pAnnotations , @ Nonnull IChildRunner < Element > pChildRunner ) { } @ Override public void serializeDynamicNode ( @ Nonnull Element pParentOutputData , @ Nonnull String pName , @ Nonnull Class < ? extends IPropertyPitProvider > pPropertyType , @ Nonnull Class < ? extends IPropertyPitProvider > pType , @ Nullable List < ? extends Annotation > pAnnotations , @ Nonnull IChildRunner < Element > pChildRunner ) { } @ Override public void serializeFixedValue ( @ Nonnull Element pParentOutputData , @ Nonnull String pName , @ Nonnull Object pValue ) { } @ Override public < V > void serializeDynamicValue ( @ Nonnull Element pParentOutputData , @ Nonnull String pName , @ Nonnull Class < ? super V > pPropertyType , @ Nullable V pValue , @ Nullable List < ? extends Annotation > pAnnotations ) { } @ Override public void deserializeRoot ( @ Nonnull Document pRootData , @ Nonnull IChildAppender < Element > pChildAppender ) { } @ Override public void deserializeChild ( @ Nonnull Element pInputData , @ Nonnull IChildAppender < Element > pChildAppender ) { } private void _deserialize ( @ Nonnull Element pElement , @ Nonnull IChildAppender < Element > pAppendChild ) { } }

Fix:
return builder . parse ( new ByteArrayInputStream ( pXmlString . getBytes ( "UTF-8" ) ) ) ;
Buggy code:
public abstract class OperatingSystem { public abstract String getInstallDirectory ( String name , String version ) { } public String getShortcutDirectory ( String name , String version ) { } public void createScript ( Install installer , String installDir , String binDir , String name ) throws IOException { } public void mkdirs ( String directory ) throws IOException { } public static OperatingSystem getOperatingSystem ( ) { } public static class MacOS extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } } public static class Unix extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } public String getShortcutDirectory ( String name , String version ) { } public void createScript ( Install installer , String installDir , String binDir , String name ) throws IOException { String script = ( binDir + ( File . separatorChar ) ) + ( name . toLowerCase ( ) ) ; new File ( script ) . delete ( ) ; FileWriter out = new FileWriter ( script ) ; out . write ( "#!//bin//sh\n" ) ; <START_BUG> out . write ( "#<seq2seq4repair_space>Java<seq2seq4repair_space>heap<seq2seq4repair_space>size,<seq2seq4repair_space>in<seq2seq4repair_space>megabytes<seq2seq4repair_space>(see<seq2seq4repair_space>doc//README.txt)\n" ) ; <END_BUG> out . write ( "JAVA_HEAP_SIZE=32\n" ) ; out . write ( ( ( ( ( "exec<seq2seq4repair_space>" + ( System . getProperty ( "java.home" ) ) ) + "//bin//java<seq2seq4repair_space>-mx${JAVA_HEAP_SIZE}m<seq2seq4repair_space>${" ) + ( name . toUpperCase ( ) ) ) + "}<seq2seq4repair_space>" ) ) ; String jar = ( ( installDir + ( File . separator ) ) + ( name . toLowerCase ( ) ) ) + ".jar" ; out . write ( ( ( "-jar<seq2seq4repair_space>\"" + jar ) + "\"<seq2seq4repair_space>$@\n" ) ) ; out . close ( ) ; String [ ] chmodArgs = new String [ ] { "chmod" , "755" , script } ; exec ( chmodArgs ) ; } public void mkdirs ( String directory ) throws IOException { } public void exec ( String [ ] args ) throws IOException { } } public static class Windows extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } public void createScript ( Install installer , String installDir , String binDir , String name ) throws IOException { File executable = new File ( installDir , "jedit.exe" ) ; if ( ! ( executable . exists ( ) ) ) return ; String [ ] args = new String [ ] { executable . getPath ( ) , "//i" , ( ( System . getProperty ( "java.home" ) ) + ( File . separator ) ) + "bin" } ; try { Runtime . getRuntime ( ) . exec ( args ) . waitFor ( ) ; } catch ( IOException io ) { } catch ( InterruptedException ie ) { } } } public static class HalfAnOS extends OperatingSystem { public String getInstallDirectory ( String name , String version ) { } } private static OperatingSystem os ; }

Fix:
out . write ( "#<seq2seq4repair_space>Java<seq2seq4repair_space>heap<seq2seq4repair_space>size,<seq2seq4repair_space>in<seq2seq4repair_space>megabytes\n" ) ;