nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Item extends Entity { private int id ; private boolean active_flag ; private Seller seller ; private List < ItemAttribute > itemAttributes ; public Item ( Connection pConn , int pintEntityID , boolean pblnIsLoadRecursive ) { } public Item ( int id , Seller seller , boolean active_flag ) { } public Item ( Seller seller ) { } public int getSeller_id ( ) { } public Seller getSeller ( ) { } public void setSeller ( Seller seller ) { } public boolean isActive_flag ( ) { } public List < ItemAttribute > getItemAttributes ( ) { } public void setItemAttributes ( List < ItemAttribute > itemAttributes ) { } public void addAttribute ( AttributeName name , String value ) { } public void addAttribute ( ItemAttribute att ) { } public int getId ( ) { } @ Override public void load ( Connection pConn , int pintEntityID , boolean pblnIsLoadRecursive ) { <START_BUG> try ( PreparedStatement statement = pConn . prepareStatement ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>Item<seq2seq4repair_space>WHERE<seq2seq4repair_space>item_id<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ) { <END_BUG> statement . setInt ( 1 , pintEntityID ) ; statement . execute ( ) ; ResultSet rsNew = statement . getResultSet ( ) ; if ( rsNew . first ( ) ) { Logger . debug ( ( "Loading<seq2seq4repair_space>Item<seq2seq4repair_space>from<seq2seq4repair_space>DB<seq2seq4repair_space>with<seq2seq4repair_space>id=" + pintEntityID ) ) ; this . id = rsNew . getInt ( "item_id" ) ; this . active_flag = rsNew . getBoolean ( "active_flag" ) ; if ( pblnIsLoadRecursive ) { loadReferences ( pConn , rsNew . getInt ( "seller_id" ) ) ; } } else { Logger . debug ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>Item<seq2seq4repair_space>from<seq2seq4repair_space>DB<seq2seq4repair_space>with<seq2seq4repair_space>id=" + pintEntityID ) ) ; } } catch ( SQLException e ) { Logger . error ( ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occured<seq2seq4repair_space>while<seq2seq4repair_space>loading<seq2seq4repair_space>item<seq2seq4repair_space>with<seq2seq4repair_space>id=" + pintEntityID ) , e ) ; } } protected void loadReferences ( Connection pConn , int seller_id ) { } @ Override public int saveReferences ( Connection pConn ) { } @ Override protected int update ( Connection pConn ) { } @ Override protected int insert ( Connection pConn ) { } @ Override protected int delete ( Connection pConn ) { } public static List < Item > loadItemsFromDB ( Connection conn ) { } @ Override public String toString ( ) { } }

Fix:
try ( PreparedStatement statement = pConn . prepareStatement ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>item<seq2seq4repair_space>WHERE<seq2seq4repair_space>item_id<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ) {
Buggy code:
public class Player extends SimpleObject { private int objectID ; private Vector2 _direction = new Vector2 ( ) ; private Vector3 localPos = new Vector3 ( ) ; private Vector3 velocity = new Vector3 ( 0 , 0 , 0 ) ; private Vector2 tendency = new Vector2 ( ) ; private float moveamount = 0 ; private float deltamove = 0.2F ; private Vector3 g = new Vector3 ( 0 , ( - 9.81F ) , 0 ) ; private float mass ; private int energy ; private float minimunY = GameConstants . scale ; private float scale ; private boolean isColiding ; private boolean jumping ; public Player ( IMaterial mat , IModel mod , String nm , int energy ) { } public void Collide ( float min ) { } public void setDirection ( Vector2 dir , float after ) { } @ Override public void Update ( ) { } void Move ( ) { Vector3 pp = this . getPosition ( ) ; this . moveamount -= deltamove ; Vector3 delta = new Vector3 ( _direction . getX ( ) , 0 , _direction . getY ( ) ) . mul ( deltamove ) ; this . setPosition ( pp . add ( delta ) ) ; if ( ( this . moveamount ) <= 0 ) { <START_BUG> setLocalPos ( new Vector3 ( ( ( localPos . getX ( ) ) + ( _direction . getX ( ) ) ) , this . minimunY , ( ( localPos . getZ ( ) ) + ( _direction . getY ( ) ) ) ) ) ; <END_BUG> _direction = new Vector2 ( ) ; } } void Jump ( ) { } public Vector3 getLocalPos ( ) { } public void setLocalPos ( Vector3 localPos ) { } public boolean isJumping ( ) { } public void setJumping ( boolean jumping ) { } public int getEnergy ( ) { } public void setEnergy ( int energy ) { } }

Fix:
setLocalPos ( new Vector3 ( ( ( localPos . getX ( ) ) + ( _direction . getX ( ) ) ) , ( ( this . minimunY ) // ( GameConstants . scale ) ) , ( ( localPos . getZ ( ) ) + ( _direction . getY ( ) ) ) ) ) ;
Buggy code:
public class Ejbc extends MatchingTask { public boolean keepgenerated ; private String classpath ; private File descriptorDirectory ; private File generatedFilesDirectory ; private File generatedManifestFile ; private File sourceDirectory ; public void setClasspath ( String s ) { } public void setDescriptors ( String dirName ) { } public void setDest ( String dirName ) { } public void setKeepgenerated ( String newKeepgenerated ) { } public void setManifest ( String manifestFilename ) { } public void setSrc ( String dirName ) { } public boolean getKeepgenerated ( ) { } public void execute ( ) throws TaskException { if ( ( ( descriptorDirectory ) == null ) || ( ! ( descriptorDirectory . isDirectory ( ) ) ) ) { throw new TaskException ( ( ( "descriptors<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( descriptorDirectory . getPath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ; } if ( ( ( generatedFilesDirectory ) == null ) || ( ! ( generatedFilesDirectory . isDirectory ( ) ) ) ) { throw new TaskException ( ( ( "dest<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( generatedFilesDirectory . getPath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ; } if ( ( ( sourceDirectory ) == null ) || ( ! ( sourceDirectory . isDirectory ( ) ) ) ) { throw new TaskException ( ( ( "src<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( sourceDirectory . getPath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ; } String systemClassPath = System . getProperty ( "java.class.path" ) ; String execClassPath = getProject ( ) . translatePath ( ( ( ( ( systemClassPath + ":" ) + ( classpath ) ) + ":" ) + ( generatedFilesDirectory ) ) ) ; DirectoryScanner ds = super . getDirectoryScanner ( descriptorDirectory ) ; String [ ] files = ds . getIncludedFiles ( ) ; Java helperTask = ( ( Java ) ( getProject ( ) . createTask ( "java" ) ) ) ; helperTask . setFork ( true ) ; helperTask . setClassname ( "org.apache.tools.ant.taskdefs.optional.ejb.EjbcHelper" ) ; String args = "" ; args += "<seq2seq4repair_space>" + ( descriptorDirectory ) ; args += "<seq2seq4repair_space>" + ( generatedFilesDirectory ) ; args += "<seq2seq4repair_space>" + ( sourceDirectory ) ; args += "<seq2seq4repair_space>" + ( generatedManifestFile ) ; args += "<seq2seq4repair_space>" + ( keepgenerated ) ; for ( int i = 0 ; i < ( files . length ) ; ++ i ) { args += "<seq2seq4repair_space>" + ( files [ i ] ) ; } Argument arguments = helperTask . createArg ( ) ; arguments . setLine ( args ) ; <START_BUG> helperTask . setClasspath ( new org . apache . tools . ant . types . Path ( getProject ( ) , execClassPath ) ) ; <END_BUG> if ( ( helperTask . executeJava ( ) ) != 0 ) { throw new TaskException ( "Execution<seq2seq4repair_space>of<seq2seq4repair_space>ejbc<seq2seq4repair_space>helper<seq2seq4repair_space>failed" ) ; } } }

Fix:
helperTask . setClasspath ( new Path ( execClassPath ) ) ;
Buggy code:
@ Singleton public class NodeManager { private ConfigUtil configUtil ; private CDECArtifact cdecArtifact ; @ Inject public NodeManager ( ConfigUtil configUtil , CDECArtifact cdecArtifact ) throws IOException { } public String add ( NodeConfig node ) throws IOException , IllegalArgumentException { } protected Command getAddNodeCommand ( Version currentCodenvyVersion , String property , AdditionalNodesConfigUtil nodesConfigUtil , NodeConfig node , Config config ) throws NodeException { } public String remove ( String dns ) throws IOException , IllegalArgumentException { } protected Command getRemoveNodeCommand ( NodeConfig node , Config config , AdditionalNodesConfigUtil nodesConfigUtil , Version currentCodenvyVersion , String property ) throws NodeException { } protected boolean isPuppetAgentActive ( NodeConfig node ) throws AgentException { Command getPuppetAgentStatusCommand = getShellAgentCommand ( "sudo<seq2seq4repair_space>service<seq2seq4repair_space>puppet<seq2seq4repair_space>status" , node ) ; String result = null ; try { result = getPuppetAgentStatusCommand . execute ( ) ; } catch ( CommandException e ) { return false ; } <START_BUG> return ( ( result != null ) && ( result . contains ( "Loaded:<seq2seq4repair_space>loaded" ) ) ) && ( result . contains ( "Active:<seq2seq4repair_space>active<seq2seq4repair_space>(running)" ) ) ; <END_BUG> } protected void validate ( NodeConfig node ) throws NodeException { } protected Command getShellAgentCommand ( String command , NodeConfig node ) throws AgentException { } protected Config getCodenvyConfig ( ConfigUtil configUtil ) throws IOException { } protected AdditionalNodesConfigUtil getNodesConfigUtil ( Config config ) { } }

Fix:
return ( ( result != null ) && ( result . contains ( "Loaded:<seq2seq4repair_space>loaded" ) ) ) && ( result . contains ( "(running)" ) ) ;
Buggy code:
class BinaryField extends BinaryMember implements IField { protected BinaryField ( JavaElement parent , String name ) { } public boolean equals ( Object o ) { } public IAnnotation [ ] getAnnotations ( ) throws JavaModelException { IBinaryField info = ( ( IBinaryField ) ( getElementInfo ( ) ) ) ; IBinaryAnnotation [ ] binaryAnnotations = info . getAnnotations ( ) ; <START_BUG> return getAnnotations ( binaryAnnotations ) ; <END_BUG> } public Object getConstant ( ) throws JavaModelException { } public int getFlags ( ) throws JavaModelException { } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public String getKey ( boolean forceOpen ) throws JavaModelException { } public String getTypeSignature ( ) throws JavaModelException { } public boolean isEnumConstant ( ) throws JavaModelException { } public boolean isResolved ( ) { } public JavaElement resolved ( Binding binding ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } public String getAttachedJavadoc ( IProgressMonitor monitor ) throws JavaModelException { } }

Fix:
return getAnnotations ( binaryAnnotations , info . getTagBits ( ) ) ;
Buggy code:
public class ModClusterDisableContext implements OperationStepHandler { static final ModClusterDisableContext INSTANCE = new ModClusterDisableContext ( ) ; static OperationDefinition getDefinition ( ResourceDescriptionResolver descriptionResolver ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ) != null ) ) { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ; final ModClusterServiceMBean service = ( ( ModClusterServiceMBean ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "disable-context:<seq2seq4repair_space>%s" , operation ) ; final String webHost = ModClusterSubsystemResourceDefinition . VIRTUAL_HOST . resolveModelAttribute ( context , operation ) . asString ( ) ; final String webContext = ModClusterSubsystemResourceDefinition . CONTEXT . resolveModelAttribute ( context , operation ) . asString ( ) ; try { service . disableContext ( webHost , webContext ) ; } catch ( IllegalArgumentException e ) { <START_BUG> throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . ContextOrHostNotFound ( webHost , webContext ) ) ) ; <END_BUG> } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { service . enableContext ( webHost , webContext ) ; } } ) ; } } , RUNTIME ) ; } context . stepCompleted ( ) ; } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . contextOrHostNotFound ( webHost , webContext ) ) ) ;
Buggy code:
public class Speed implements CommandExecutor { public Speed ( main main ) { } String prefix = ( ( ChatColor . BLUE ) + "Condition><seq2seq4repair_space>" ) + ( ChatColor . GRAY ) ; String insufperms = ( ( ( ChatColor . BLUE ) + "Permission><seq2seq4repair_space>" ) + ( ChatColor . RED ) ) + "You<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>sufficient<seq2seq4repair_space>permissions<seq2seq4repair_space>to<seq2seq4repair_space>preform<seq2seq4repair_space>this<seq2seq4repair_space>command." ; String incusage = ( ( ChatColor . BLUE ) + "Usage><seq2seq4repair_space>" ) + ( ChatColor . GRAY ) ; public boolean onCommand ( CommandSender sender , Command cmd , String label , String [ ] args ) { Player p = ( ( Player ) ( sender ) ) ; if ( sender instanceof Player ) ; if ( cmd . getName ( ) . equalsIgnoreCase ( "speed" ) ) { <START_BUG> if ( p . hasPermission ( "overpoweredplugin.speed" ) ) { <END_BUG> float speed = 0.0F ; if ( ( args . length ) >= 1 ) { speed = Float . valueOf ( Integer . parseInt ( args [ 0 ] ) ) . floatValue ( ) ; if ( ( speed < 1.0F ) || ( speed > 10.0F ) ) { p . sendMessage ( ( ( ( prefix ) + ( incusage ) ) + "//speed<seq2seq4repair_space><1-10><seq2seq4repair_space>[walk|fly]" ) ) ; return false ; } } if ( ( args . length ) == 1 ) { p . setWalkSpeed ( ( speed // 10.0F ) ) ; p . setFlySpeed ( ( speed // 10.0F ) ) ; p . sendMessage ( ( ( ( ( prefix ) + "Speed<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( ChatColor . BLUE ) ) + speed ) ) ; } else if ( ( args . length ) == 2 ) { if ( args [ 1 ] . equalsIgnoreCase ( "walk" ) ) { p . setFlySpeed ( ( speed // 10.0F ) ) ; p . sendMessage ( ( ( ( ( prefix ) + "Fly-Speed<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( ChatColor . BLUE ) ) + speed ) ) ; } else if ( args [ 1 ] . equalsIgnoreCase ( "fly" ) ) { p . setWalkSpeed ( ( speed // 10.0F ) ) ; p . sendMessage ( ( ( ( ( prefix ) + "Walk-Speed<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( ChatColor . BLUE ) ) + speed ) ) ; } else { p . sendMessage ( ( ( ( prefix ) + ( incusage ) ) + "//speed<seq2seq4repair_space><1-10><seq2seq4repair_space>[walk|fly]" ) ) ; } } else { p . sendMessage ( ( ( ( prefix ) + ( incusage ) ) + "//speed<seq2seq4repair_space><1-10><seq2seq4repair_space>[walk|fly]" ) ) ; } } else { p . sendMessage ( ( ( prefix ) + ( insufperms ) ) ) ; } } return false ; } }

Fix:
if ( p . hasPermission ( "vn.speed" ) ) {
Buggy code:
public class RenameResourceAction extends WorkspaceAction { private TreeEditor treeEditor ; private Tree navigatorTree ; private Text textEditor ; private Composite textEditorParent ; private TextActionHandler textActionHandler ; private IResource inlinedResource ; public static final String ID = ( PlatformUI . PLUGIN_ID ) + ".RenameResourceAction" ; private IPath newPath ; private static final String CHECK_RENAME_TITLE = WorkbenchMessages . getString ( "RenameResourceAction.checkTitle" ) ; private static final String CHECK_RENAME_MESSAGE = WorkbenchMessages . getString ( "RenameResourceAction.readOnlyCheck" ) ; private static String RESOURCE_EXISTS_TITLE = WorkbenchMessages . getString ( "RenameResourceAction.resourceExists" ) ; private static String RESOURCE_EXISTS_MESSAGE = WorkbenchMessages . getString ( "RenameResourceAction.overwriteQuestion" ) ; private static String RENAMING_MESSAGE = WorkbenchMessages . getString ( "RenameResourceAction.progressMessage" ) ; public RenameResourceAction ( Shell shell ) { } public RenameResourceAction ( Shell shell , Tree tree ) { } private boolean checkOverwrite ( final Shell shell , final IResource destination ) { } private boolean checkReadOnlyAndNull ( IResource currentResource ) { } Composite createParent ( ) { } private void createTextEditor ( final IResource resource ) { } private void disposeTextWidget ( ) { } String getOperationMessage ( ) { } String getProblemsMessage ( ) { } String getProblemsTitle ( ) { } private Tree getTree ( ) { } private boolean getUpdateValue ( IStructuredSelection selection ) { } void invokeOperation ( IResource resource , IProgressMonitor monitor ) throws CoreException { monitor . beginTask ( RenameResourceAction . RENAMING_MESSAGE , 100 ) ; IWorkspaceRoot workspaceRoot = resource . getWorkspace ( ) . getRoot ( ) ; IResource newResource = workspaceRoot . findMember ( newPath ) ; if ( newResource != null ) { if ( checkOverwrite ( getShell ( ) , newResource ) ) newResource . delete ( IResource . KEEP_HISTORY , new SubProgressMonitor ( monitor , 50 ) ) ; else { monitor . worked ( 100 ) ; return ; } } if ( ( resource . getType ( ) ) == ( IResource . PROJECT ) ) { IProject project = ( ( IProject ) ( resource ) ) ; IProjectDescription description = project . getDescription ( ) ; description . setName ( newPath . segment ( 0 ) ) ; <START_BUG> project . move ( description , true , monitor ) ; <END_BUG> } else resource . move ( newPath , ( ( IResource . KEEP_HISTORY ) | ( IResource . SHALLOW ) ) , new SubProgressMonitor ( monitor , 50 ) ) ; } protected String queryNewResourceName ( final IResource resource ) { } private void queryNewResourceNameInline ( final IResource resource ) { } public void run ( ) { } private void runWithInlineEditor ( ) { } protected void runWithNewPath ( IPath path , IResource resource ) { } private void saveChangesAndDispose ( IResource resource ) { } protected boolean updateSelection ( IStructuredSelection selection ) { } public void setTextActionHandler ( TextActionHandler actionHandler ) { } protected List getActionResources ( ) { } }

Fix:
project . move ( description , ( ( IResource . FORCE ) | ( IResource . SHALLOW ) ) , monitor ) ;
Buggy code:
class JTidyHTMLParser extends HTMLParser { private static transient Logger log = LoggingManager . getLoggerForClass ( ) ; protected JTidyHTMLParser ( ) { } protected boolean isReusable ( ) { } public Iterator getEmbeddedResourceURLs ( byte [ ] html , URL baseUrl , URLCollection urls ) throws HTMLParseException { } private URL scanNodes ( Node node , URLCollection urls , URL baseUrl ) throws HTMLParseException { if ( node == null ) { return baseUrl ; } String name = node . getNodeName ( ) ; int type = node . getNodeType ( ) ; switch ( type ) { case Node . DOCUMENT_NODE : scanNodes ( ( ( Document ) ( node ) ) . getDocumentElement ( ) , urls , baseUrl ) ; break ; case Node . ELEMENT_NODE : NamedNodeMap attrs = node . getAttributes ( ) ; if ( name . equalsIgnoreCase ( "base" ) ) { String tmp = getValue ( attrs , "href" ) ; if ( tmp != null ) try { baseUrl = new URL ( baseUrl , tmp ) ; } catch ( MalformedURLException e ) { throw new HTMLParseException ( e ) ; } break ; } <START_BUG> if ( ( name . equalsIgnoreCase ( "img" ) ) || ( name . equalsIgnoreCase ( "embed" ) ) ) { <END_BUG> urls . addURL ( getValue ( attrs , "src" ) , baseUrl ) ; break ; } if ( name . equalsIgnoreCase ( "applet" ) ) { urls . addURL ( getValue ( attrs , "code" ) , baseUrl ) ; break ; } if ( name . equalsIgnoreCase ( "input" ) ) { String src = getValue ( attrs , "src" ) ; String typ = getValue ( attrs , "type" ) ; if ( ( src != null ) && ( typ . equalsIgnoreCase ( "image" ) ) ) { urls . addURL ( src , baseUrl ) ; } break ; } if ( ( name . equalsIgnoreCase ( "link" ) ) && ( getValue ( attrs , "rel" ) . equalsIgnoreCase ( "stylesheet" ) ) ) { urls . addURL ( getValue ( attrs , "href" ) , baseUrl ) ; break ; } if ( name . equalsIgnoreCase ( "script" ) ) { urls . addURL ( getValue ( attrs , "src" ) , baseUrl ) ; break ; } if ( name . equalsIgnoreCase ( "frame" ) ) { urls . addURL ( getValue ( attrs , "src" ) , baseUrl ) ; break ; } String back = getValue ( attrs , "background" ) ; if ( back != null ) { urls . addURL ( back , baseUrl ) ; break ; } if ( name . equalsIgnoreCase ( "bgsound" ) ) { urls . addURL ( getValue ( attrs , "src" ) , baseUrl ) ; break ; } if ( name . equalsIgnoreCase ( "frame" ) ) { urls . addURL ( getValue ( attrs , "src" ) , baseUrl ) ; break ; } NodeList children = node . getChildNodes ( ) ; if ( children != null ) { int len = children . getLength ( ) ; for ( int i = 0 ; i < len ; i ++ ) { baseUrl = scanNodes ( children . item ( i ) , urls , baseUrl ) ; } } break ; } return baseUrl ; } private String getValue ( NamedNodeMap attrs , String attname ) { } private static Tidy getTidyParser ( ) { } private static Node getDOM ( byte [ ] text ) throws SAXException { } }

Fix:
if ( name . equalsIgnoreCase ( "img" ) ) {
Buggy code:
public final class HtmlParsingUtils { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private HtmlParsingUtils ( ) { } public static boolean isAnchorMatched ( HTTPSamplerBase newLink , HTTPSamplerBase config ) { } public static boolean isArgumentMatched ( Argument arg , Argument patternArg ) { } public static boolean isEqualOrMatches ( String arg , String pat , Perl5Matcher matcher , PatternCacheLRU cache ) { } public static boolean isEqualOrMatchesCaseBlind ( String arg , String pat , Perl5Matcher matcher , PatternCacheLRU cache ) { } public static boolean isEqualOrMatches ( String arg , String pat ) { } public static boolean isEqualOrMatchesCaseBlind ( String arg , String pat ) { } public static Tidy getParser ( ) { } public static Node getDOM ( String text ) { } public static Document createEmptyDoc ( ) { } public static HTTPSamplerBase createUrlFromAnchor ( String parsedUrlString , URL context ) throws MalformedURLException { } public static List < HTTPSamplerBase > createURLFromForm ( Node doc , URL context ) { } private static boolean recurseForm ( Node tempNode , LinkedList < HTTPSamplerBase > urlConfigs , URL context , String selectName , boolean inForm ) { } private static String getAttributeValue ( NamedNodeMap att , String attName ) { } private static String printNode ( Node node ) { <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> buf . append ( "<" ) ; buf . append ( node . getNodeName ( ) ) ; NamedNodeMap atts = node . getAttributes ( ) ; for ( int x = 0 ; x < ( atts . getLength ( ) ) ; x ++ ) { buf . append ( "<seq2seq4repair_space>" ) ; buf . append ( atts . item ( x ) . getNodeName ( ) ) ; buf . append ( "=\"" ) ; buf . append ( atts . item ( x ) . getNodeValue ( ) ) ; buf . append ( "\"" ) ; } buf . append ( ">" ) ; return buf . toString ( ) ; } private static HTTPSamplerBase createFormUrlConfig ( Node tempNode , URL context ) throws MalformedURLException { } public static void extractStyleURLs ( final URL baseUrl , final URLCollection urls , String styleTagStr ) { } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
class CollectionToCollection extends AbstractCollectionConverter { public CollectionToCollection ( TypeDescriptor sourceCollectionType , TypeDescriptor targetCollectionType , GenericConversionService conversionService ) { } @ Override @ SuppressWarnings ( "unchecked" ) protected Object doExecute ( Object source ) throws Exception { } private ConversionExecutor getElementConverter ( Collection < ? > source ) { ConversionExecutor elementConverter = getElementConverter ( ) ; <START_BUG> if ( ( ( elementConverter == ( NoOpConversionExecutor . INSTANCE ) ) && ( ! ( source . isEmpty ( ) ) ) ) && ( ( getTargetElementType ( ) ) != null ) ) { <END_BUG> Iterator < ? > it = source . iterator ( ) ; while ( it . hasNext ( ) ) { Object value = it . next ( ) ; if ( value != null ) { elementConverter = getConversionService ( ) . getConversionExecutor ( value . getClass ( ) , TypeDescriptor . valueOf ( getTargetElementType ( ) ) ) ; break ; } } } return elementConverter ; } }

Fix:
if ( ( elementConverter == ( NoOpConversionExecutor . INSTANCE ) ) && ( ( getTargetElementType ( ) ) != null ) ) {
Buggy code:
public class PatchElementImpl implements PatchElement , UpgradeCallback { private final String id ; private String descr ; private PatchElementProvider provider ; private PatchType patchType ; private String resultingVersion ; private final List < ContentModification > modifications = new ArrayList < ContentModification > ( ) ; public PatchElementImpl ( String id ) { } @ Override public String getId ( ) { } @ Override public String getDescription ( ) { } public PatchElementImpl setDescription ( String descr ) { } @ Override public PatchElementProvider getProvider ( ) { } public PatchElementImpl setProvider ( PatchElementProvider provider ) { } @ Override public PatchType getPatchType ( ) { } @ Override public String getResultingVersion ( ) { } @ Override public List < ContentModification > getModifications ( ) { } public PatchElementImpl addContentModification ( ContentModification modification ) { } @ Override public PatchElementImpl setUpgrade ( String version ) { if ( version == null ) { throw new IllegalArgumentException ( "version<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; } this . resultingVersion = version ; <START_BUG> this . patchType = PatchType . CUMULATIVE ; <END_BUG> return this ; } @ Override public PatchElementImpl setNoUpgrade ( ) { } }

Fix:
this . patchType = PatchType . UPGRADE ;
Buggy code:
public class BPModel implements Observer { private Player player ; private ArrayList < Projectile > projectiles = new ArrayList < Projectile > ( ) ; private ArrayList < Enemy > enemies = new ArrayList < Enemy > ( ) ; public BPModel ( ) { } public void update ( float dt ) { } private void removeOldProjectiles ( ) { } private void spawnEnemies ( ) { <START_BUG> for ( int i = 0 ; i < 5 ; i ++ ) { <END_BUG> enemies . add ( new Enemy ( player ) ) ; } for ( Enemy e : enemies ) { Random r = new Random ( ) ; e . getPosition ( ) . setX ( ( ( r . nextFloat ( ) ) * 800 ) ) ; e . getPosition ( ) . setY ( ( ( r . nextFloat ( ) ) * 480 ) ) ; e . addObserver ( this ) ; } } public void newGame ( ) { } public ArrayList < Projectile > getProjectiles ( ) { } public Player getPlayer ( ) { } public ArrayList < Enemy > getEnemies ( ) { } public void addProjectile ( Projectile p ) { } @ Override public void update ( Observable o , Object arg ) { } }

Fix:
for ( int i = 0 ; i < 1 ; i ++ ) {
Buggy code:
public class AjaxButtonTest extends TestCase { private WicketTester tester ; @ Override public void setUp ( ) { } public void testAjaxButtonWhenCancelButtonHasAModelValue ( ) { tester . startPage ( HomePage . class ) ; tester . assertRenderedPage ( HomePage . class ) ; tester . assertLabel ( "message" , "If<seq2seq4repair_space>you<seq2seq4repair_space>see<seq2seq4repair_space>this<seq2seq4repair_space>message<seq2seq4repair_space>wicket<seq2seq4repair_space>is<seq2seq4repair_space>properly<seq2seq4repair_space>configured<seq2seq4repair_space>and<seq2seq4repair_space>running" ) ; HomePage homePage = ( ( HomePage ) ( tester . getLastRenderedPage ( ) ) ) ; TestForm testForm = homePage . getForm ( ) ; <START_BUG> tester . getRequest ( ) . getPostRequestParameters ( ) . setParameterValue ( homePage . getForm ( ) . getSubmitButton ( ) . getInputName ( ) , "x" ) ; <END_BUG> tester . executeAjaxEvent ( testForm . getSubmitButton ( ) , "onclick" ) ; } }

Fix:
tester . getRequest ( ) . getPostParameters ( ) . setParameterValue ( homePage . getForm ( ) . getSubmitButton ( ) . getInputName ( ) , "x" ) ;
Buggy code:
public abstract class AbstractDeploymentChainStep implements OperationStepHandler { private static DeploymentProcessorTarget TARGET = new DeploymentProcessorTarget ( ) { public void addDeploymentProcessor ( final String subsystemName , final Phase phase , final int priority , final DeploymentUnitProcessor processor ) { } @ Override public void addDeploymentProcessor ( final Phase phase , final int priority , final DeploymentUnitProcessor processor ) { } } ; public final void execute ( final OperationContext context , final ModelNode operation ) { execute ( AbstractDeploymentChainStep . TARGET ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } protected abstract void execute ( DeploymentProcessorTarget processorTarget ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class SimpleTestPanelTest extends WicketTestCase { public SimpleTestPanelTest ( String name ) { } public void testRenderHomePage_2 ( ) throws Exception { executeTest ( SimpleTestPage . class , "SimpleTestPageExpectedResult.html" ) ; application . setupRequestAndResponse ( ) ; <START_BUG> application . getAjaxSettings ( ) . setAjaxDebugModeEnabled ( false ) ; <END_BUG> WebRequestCycle cycle = application . createRequestCycle ( ) ; Page page = application . getLastRenderedPage ( ) ; String url = ( ( SimpleTestPanel ) ( page . get ( "testPanel" ) ) ) . getTimeBehavior ( ) . getCallbackUrl ( ) . toString ( ) ; application . getServletRequest ( ) . setRequestToRedirectString ( url ) ; application . processRequestCycle ( cycle ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , SimpleTestPage . class , "SimpleTestPageExpectedResult-1.html" ) ) ; } }

Fix:
application . getDebugSettings ( ) . setAjaxDebugModeEnabled ( false ) ;
Buggy code:
public class ValidateOperationHandler implements OperationStepHandler , DescriptionProvider { public static ValidateOperationHandler INSTANCE = new ValidateOperationHandler ( false ) ; public static ValidateOperationHandler SLAVE_HC_INSTANCE = new ValidateOperationHandler ( true ) ; public static String OPERATION_NAME = VALIDATE_OPERATION ; private final boolean slave ; private ValidateOperationHandler ( boolean slave ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ModelNode op = operation . require ( VALUE ) ; PathAddress addr = PathAddress . pathAddress ( op . get ( OP_ADDR ) ) ; if ( slave ) { op = op . clone ( ) ; if ( ( ( addr . size ( ) ) > 0 ) && ( addr . getElement ( 0 ) . getKey ( ) . equals ( HOST ) ) ) { addr = addr . subAddress ( 1 ) ; op . get ( OP_ADDR ) . set ( addr . toModelNode ( ) ) ; } } ProxyOperationAddressTranslator translator = null ; ImmutableManagementResourceRegistration proxyReg = null ; PathAddress proxyAddr = PathAddress . EMPTY_ADDRESS ; for ( PathElement element : addr ) { proxyAddr = proxyAddr . append ( element ) ; ImmutableManagementResourceRegistration reg = context . getResourceRegistration ( ) . getSubModel ( proxyAddr ) ; if ( reg . isRemote ( ) ) { translator = ( element . getKey ( ) . equals ( SERVER ) ) ? ProxyOperationAddressTranslator . SERVER : ProxyOperationAddressTranslator . HOST ; proxyReg = reg ; break ; } } if ( proxyReg != null ) { ModelNode proxyOp = operation . clone ( ) ; proxyOp . get ( OP_ADDR ) . set ( proxyAddr . toModelNode ( ) ) ; proxyOp . get ( VALUE , OP_ADDR ) . set ( translator . translateAddress ( addr ) . toModelNode ( ) ) ; ModelNode result = new ModelNode ( ) ; context . addStep ( result , proxyOp , proxyReg . getOperationHandler ( EMPTY_ADDRESS , VALIDATE_OPERATION ) , IMMEDIATE ) ; if ( ( context . completeStep ( ) ) == ( ResultAction . ROLLBACK ) ) { context . getFailureDescription ( ) . set ( result . get ( FAILURE_DESCRIPTION ) ) ; } } else { try { <START_BUG> new org . jboss . as . controller . operations . validation . OperationValidator ( context . getResourceRegistration ( ) ) . validateOperation ( op ) ; <END_BUG> } catch ( IllegalArgumentException e ) { e . printStackTrace ( ) ; context . getFailureDescription ( ) . set ( e . getMessage ( ) ) ; } context . completeStep ( ) ; } } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
new org . jboss . as . controller . operations . validation . OperationValidator ( context . getResourceRegistration ( ) , false , false ) . validateOperation ( op ) ;
Buggy code:
public class ConcatExpressionTest { @ Test public void testLogic ( ) { } private Object eval ( ExpressionBase ... parts ) { } @ Test public void testUsesToStringExtension ( ) { final NamedFunction myToString = new org . eclipse . xtend . backend . testhelpers . NamedFunctionFactory ( org . eclipse . xtend . backend . common . Helpers . TO_STRING_METHOD_NAME , org . eclipse . xtend . backend . types . builtin . ObjectType . INSTANCE ) { public Object invoke ( ExecutionContext ctx , Object [ ] params ) { return ( "#" + ( params [ 0 ] ) ) + "!" ; } } . create ( ) ; final FunctionDefContextInternal fdc = new org . eclipse . xtend . backend . functions . FunctionDefContextFactory ( new org . eclipse . xtend . backend . types . CompositeTypesystem ( ) ) . create ( ) ; <START_BUG> fdc . register ( myToString ) ; <END_BUG> final ExpressionBase expr = new ConcatExpression ( Arrays . asList ( createLiteral ( "a" ) , createLiteral ( "b" ) ) , SOURCE_POS ) ; final ExecutionContext ctx = createEmptyExecutionContext ( ) ; assertEquals ( "ab" , expr . evaluate ( ctx ) . toString ( ) ) ; ctx . setFunctionDefContext ( fdc ) ; assertEquals ( "#a!#b!" , expr . evaluate ( ctx ) . toString ( ) ) ; } }

Fix:
fdc . register ( myToString , true ) ;
Buggy code:
public class AddAddressToWhiteListAction extends AbstractColumbaAction implements SelectionListener { public AddAddressToWhiteListAction ( FrameMediator frameMediator ) { } public void selectionChanged ( SelectionChangedEvent e ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new AddAddressToWhiteListCommand ( r ) ) ; } }

Fix:
FolderCommandReference r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
final class ApplicationServerService implements Service < ServerController > { private ServerController serverController ; private TrackingServiceTarget serviceTarget ; private final Configuration configuration ; private final List < AbstractServerModelUpdate < ? > > initialUpdates ; private final List < ServiceActivator > services ; public ApplicationServerService ( final Bootstrap . Configuration configuration , final List < AbstractServerModelUpdate < ? > > initialUpdates , final List < ServiceActivator > services ) { } public synchronized void start ( final StartContext context ) throws StartException { serviceTarget = new TrackingServiceTarget ( context . getController ( ) . getServiceContainer ( ) ) ; final ServiceActivatorContext serviceActivatorContext = new ServiceActivatorContext ( ) { public ServiceTarget getServiceTarget ( ) { return serviceTarget ; } public ServiceRegistry getServiceRegistry ( ) { return new org . jboss . msc . service . DelegatingServiceRegistry ( context . getController ( ) . getServiceContainer ( ) ) ; } } ; <START_BUG> serverController = new ServerControllerImpl ( new org . jboss . as . model . ServerModel ( configuration . getName ( ) , configuration . getPortOffset ( ) ) , context . getController ( ) . getServiceContainer ( ) , configuration . getServerEnvironment ( ) . isStandalone ( ) ) ; <END_BUG> for ( ServiceActivator activator : services ) { activator . activate ( serviceActivatorContext ) ; } } public synchronized void stop ( final StopContext context ) { } public ServerController getValue ( ) throws IllegalArgumentException , IllegalStateException { } }

Fix:
serverController = new ServerControllerImpl ( new org . jboss . as . model . ServerModel ( configuration . getName ( ) , configuration . getPortOffset ( ) ) , context . getController ( ) . getServiceContainer ( ) ) ;
Buggy code:
class ClasspathMultiDirectory extends ClasspathDirectory { String sourcePath ; NameEnvironment nameEnvironment ; ClasspathMultiDirectory ( String sourcePath , String binaryPath ) { } void cleanup ( ) { } public boolean equals ( Object o ) { if ( ( this ) == o ) return true ; if ( ! ( o instanceof ClasspathMultiDirectory ) ) return false ; ClasspathMultiDirectory md = ( ( ClasspathMultiDirectory ) ( o ) ) ; <START_BUG> return ( binaryPath . equalsIgnoreCase ( md . binaryPath ) ) && ( sourcePath . equalsIgnoreCase ( md . sourcePath ) ) ; <END_BUG> } NameEnvironmentAnswer findClass ( char [ ] className , char [ ] [ ] packageName ) { } public String toString ( ) { } }

Fix:
return ( binaryPath . equals ( md . binaryPath ) ) && ( sourcePath . equals ( md . sourcePath ) ) ;
Buggy code:
public class TestNeverDelete extends LuceneTestCase { public void testIndexing ( ) throws Exception { final File tmpDir = createTempDir ( "TestNeverDelete" ) ; final BaseDirectoryWrapper d = newFSDirectory ( tmpDir ) ; if ( d instanceof MockDirectoryWrapper ) { ( ( MockDirectoryWrapper ) ( d ) ) . setNoDeleteOpenFile ( false ) ; } final RandomIndexWriter w = new RandomIndexWriter ( random ( ) , d , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setIndexDeletionPolicy ( INSTANCE ) ) ; w . w . getConfig ( ) . setMaxBufferedDocs ( TestUtil . nextInt ( random ( ) , 5 , 30 ) ) ; w . commit ( ) ; Thread [ ] indexThreads = new Thread [ random ( ) . nextInt ( 4 ) ] ; final long stopTime = ( System . currentTimeMillis ( ) ) + ( atLeast ( 1000 ) ) ; for ( int x = 0 ; x < ( indexThreads . length ) ; x ++ ) { indexThreads [ x ] = new Thread ( ) { @ Override public void run ( ) { try { int docCount = 0 ; while ( ( System . currentTimeMillis ( ) ) < stopTime ) { final Document doc = new Document ( ) ; doc . add ( newStringField ( "dc" , ( "" + docCount ) , YES ) ) ; doc . add ( newTextField ( "field" , "here<seq2seq4repair_space>is<seq2seq4repair_space>some<seq2seq4repair_space>text" , YES ) ) ; w . addDocument ( doc ) ; if ( ( docCount % 13 ) == 0 ) { w . commit ( ) ; } docCount ++ ; } } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } } ; indexThreads [ x ] . setName ( ( "Thread<seq2seq4repair_space>" + x ) ) ; indexThreads [ x ] . start ( ) ; } final Set < String > allFiles = new HashSet < > ( ) ; DirectoryReader r = DirectoryReader . open ( d ) ; while ( ( System . currentTimeMillis ( ) ) < stopTime ) { final IndexCommit ic = r . getIndexCommit ( ) ; if ( VERBOSE ) { System . out . println ( ( "TEST:<seq2seq4repair_space>check<seq2seq4repair_space>files:<seq2seq4repair_space>" + ( ic . getFileNames ( ) ) ) ) ; } allFiles . addAll ( ic . getFileNames ( ) ) ; for ( String fileName : allFiles ) { assertTrue ( ( ( "file<seq2seq4repair_space>" + fileName ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) , slowFileExists ( d , fileName ) ) ; } DirectoryReader r2 = DirectoryReader . openIfChanged ( r ) ; if ( r2 != null ) { r . close ( ) ; r = r2 ; } Thread . sleep ( 1 ) ; } r . close ( ) ; for ( Thread t : indexThreads ) { t . join ( ) ; } <START_BUG> w . close ( ) ; <END_BUG> d . close ( ) ; TestUtil . rm ( tmpDir ) ; } }

Fix:
w . shutdown ( ) ;
Buggy code:
public class Containers extends Controller { public static Result index ( ) { } private static List < Container > fetchContainers ( ) { String privRepo = Play . application ( ) . configuration ( ) . getString ( "privateRepo" ) ; if ( privRepo . equals ( "dummy" ) ) { return Containers . fetchDummyContainers ( ) ; } <START_BUG> Promise < WS . Response > resp = WS . url ( "http:////localhost:4243//containers//json" ) . get ( ) ; <END_BUG> WS . Response response = resp . get ( 10000 ) ; List < Container > containers = new ArrayList < Container > ( ) ; JsonNode jsonNode = response . asJson ( ) ; System . out . println ( jsonNode . toString ( ) ) ; Iterator < JsonNode > iter = jsonNode . elements ( ) ; while ( iter . hasNext ( ) ) { JsonNode node = iter . next ( ) ; System . out . println ( node . toString ( ) ) ; Container container = new Container ( ) ; container . id = node . get ( "Id" ) . asText ( ) ; container . name = node . get ( "Names" ) . toString ( ) ; container . image = node . get ( "Image" ) . asText ( ) ; container . status = node . get ( "Status" ) . asText ( ) ; containers . add ( container ) ; } return containers ; } private static List < Container > fetchDummyContainers ( ) { } No newline ; at end ; of file ; }

Fix:
Promise < WS . Response > resp = WS . url ( ( ( "http:////" + privRepo ) + ":4243//containers//json" ) ) . get ( ) ;
Buggy code:
public class Tuple extends Type { private List < Type > args ; public Tuple ( List < Type > l ) { } public void add ( Type t ) { } public List < Type > getArgs ( ) { } @ Override public boolean equals ( Type t ) { <START_BUG> if ( ( ( args . size ( ) ) == 1 ) && ( ( t . getType ( ) ) == ( args . get ( 0 ) . getType ( ) ) ) ) <END_BUG> return true ; else if ( ( ( ( args . size ( ) ) == 1 ) && ( ( t . getType ( ) ) == "empty" ) ) && ( ( args . get ( 0 ) . getDepth ( ) ) >= 1 ) ) return true ; else if ( ( t . getType ( ) ) != "tuple" ) return false ; if ( ( args . size ( ) ) != ( ( ( Tuple ) ( t ) ) . getArgs ( ) . size ( ) ) ) return false ; for ( int a = 0 ; a < ( args . size ( ) ) ; a ++ ) { if ( ! ( args . get ( a ) . equals ( ( ( Tuple ) ( t ) ) . getArgs ( ) . get ( a ) ) ) ) return false ; } return true ; } @ Override public String toString ( ) { } }

Fix:
if ( ( ( args . size ( ) ) == 1 ) && ( t . equals ( args . get ( 0 ) ) ) )
Buggy code:
public class PersonStubWidget implements Widget { private PersonStub person ; private List < PersonStub > options ; public PersonStubWidget ( ) { } public PersonStubWidget ( List < PersonStub > options ) { } @ Override public void setInitialValue ( Object initialValue ) { } @ Override public String generateHtml ( FormEntryContext context ) { if ( ( context . getMode ( ) ) == ( Mode . VIEW ) ) { if ( ( person ) != null ) return WidgetFactory . displayValue ( person . getDisplayValue ( ) ) ; else return "" ; } StringBuilder sb = new StringBuilder ( ) ; <START_BUG> sb . append ( ( ( "<select<seq2seq4repair_space>name=\"" + ( context . getFieldName ( this ) ) ) + "\">" ) ) ; <END_BUG> sb . append ( "\n<option<seq2seq4repair_space>value=\"\">" ) ; sb . append ( ( ( Context . getMessageSourceService ( ) . getMessage ( "general.choose" ) ) + "..." ) ) ; sb . append ( "<//option>" ) ; List < PersonStub > personList ; if ( ( options ) != null ) { personList = options ; } else { personList = new LinkedList < PersonStub > ( ) ; } for ( PersonStub p : personList ) { sb . append ( "\n<option" ) ; if ( ( ( person ) != null ) && ( person . equals ( p ) ) ) sb . append ( "<seq2seq4repair_space>selected=\"true\"" ) ; sb . append ( ( ( "<seq2seq4repair_space>value=\"" + ( p . getId ( ) ) ) + "\">" ) ) . append ( p . getDisplayValue ( ) ) . append ( "<//option>" ) ; } sb . append ( "<//select>" ) ; return sb . toString ( ) ; } public void setOptions ( List < PersonStub > options ) { } @ Override public Object getValue ( FormEntryContext context , HttpServletRequest request ) { } }

Fix:
sb . append ( ( ( ( ( "<select<seq2seq4repair_space>id=\"" + ( context . getFieldName ( this ) ) ) + "\"<seq2seq4repair_space>name=\"" ) + ( context . getFieldName ( this ) ) ) + "\">" ) ) ;
Buggy code:
public class XSElementDecl { public static final short NO_CONSTRAINT = 0 ; public static final short DEFAULT_VALUE = 1 ; public static final short FIXED_VALUE = 2 ; public String fName = null ; public String fTargetNamespace = null ; public XSTypeDecl fType = null ; short fMiscFlags = 0 ; public short fBlock = SchemaSymbols . EMPTY_SET ; public short fFinal = SchemaSymbols . EMPTY_SET ; public Object fDefault = null ; public XSElementDecl fSubGroup = null ; static final int INITIAL_SIZE = 8 ; int fIDCPos = 0 ; IdentityConstraint [ ] fIDConstraints = new IdentityConstraint [ XSElementDecl . INITIAL_SIZE ] ; private static final short CONSTRAINT_MASK = 3 ; private static final short NILLABLE = 4 ; private static final short ABSTRACT = 8 ; public short getConstraintType ( ) { } public boolean isNillable ( ) { } public boolean isAbstract ( ) { } public void setConstraintType ( short constraintType ) { } public void setIsNillable ( ) { } public void setIsAbstract ( ) { } public void addIDConstaint ( IdentityConstraint idc ) { } public IdentityConstraint [ ] getIDConstraints ( ) { } static final IdentityConstraint [ ] resize ( IdentityConstraint [ ] oldArray , int newSize ) { } public String toString ( ) { <START_BUG> return ( ( fTargetNamespace ) + "," ) + ( fName ) ; <END_BUG> } }

Fix:
return ( ( fTargetNamespace ) + ":" ) + ( fName ) ;
Buggy code:
@ Entity public class Sessao { @ Id @ GeneratedValue ( strategy = GenerationType . IDENTITY ) private Long id ; @ ManyToOne private Espetaculo espetaculo ; @ Type ( type = "org.jadira.usertype.dateandtime.joda.PersistentDateTime" ) private DateTime inicio ; private Integer duracaoEmMinutos ; private Integer totalIngressos = 0 ; private Integer ingressosReservados = 0 ; private BigDecimal preco ; public Long getId ( ) { } public void setEspetaculo ( Espetaculo espetaculo ) { } public DateTime getInicio ( ) { } public void setInicio ( DateTime inicio ) { } public Espetaculo getEspetaculo ( ) { } public Integer getDuracaoEmMinutos ( ) { } public void setDuracaoEmMinutos ( Integer duracaoEmMinutos ) { } public String getDia ( ) { } public String getHora ( ) { } public Integer getTotalIngressos ( ) { } public void setTotalIngressos ( Integer totalIngressos ) { } public Integer getIngressosReservados ( ) { } public void setIngressosReservados ( Integer ingressosReservados ) { } public Integer getIngressosDisponiveis ( ) { } public boolean pertoDoLimiteDeSeguranca_NaoUtilizada ( ) { } public void reserva ( Integer numeroDeIngressos ) { } public boolean podeReservar ( Integer numeroDeIngressos ) { int sobraram = ( getIngressosDisponiveis ( ) ) - numeroDeIngressos ; <START_BUG> boolean naoTemEspaco = sobraram <= 0 ; <END_BUG> return ! naoTemEspaco ; } public void setPreco ( BigDecimal preco ) { } public BigDecimal getPreco ( ) { } }

Fix:
boolean naoTemEspaco = sobraram < 0 ;
Buggy code:
public class FrontendMain { public static void main ( String [ ] args ) { final String port = ( ( args . length ) > 0 ) ? args [ 0 ] : "2551" ; final Config config = ConfigFactory . parseString ( ( "akka.remote.netty.tcp.port=" + port ) ) . withFallback ( ConfigFactory . parseString ( "akka.cluster.roles<seq2seq4repair_space>=<seq2seq4repair_space>[frontend]" ) ) . withFallback ( ConfigFactory . load ( ) ) ; ActorSystem system = ActorSystem . create ( "ClusterSystem" , config ) ; <START_BUG> final ActorRef frontend = system . actorOf ( Props . create ( StringMessage . class ) , "frontend" ) ; <END_BUG> final FiniteDuration interval = Duration . create ( 2 , TimeUnit . SECONDS ) ; final Timeout timeout = new Timeout ( Duration . create ( 5 , TimeUnit . SECONDS ) ) ; final ExecutionContext ec = system . dispatcher ( ) ; final AtomicInteger counter = new AtomicInteger ( ) ; system . scheduler ( ) . schedule ( interval , interval , ( ) -> ask ( frontend , new StringMessage ( ( "hello-" + ( counter . incrementAndGet ( ) ) ) ) , timeout ) . onSuccess ( new OnSuccess < Object > ( ) { @ Override public void onSuccess ( Object result ) { System . out . println ( result ) ; } } , ec ) , ec ) ; } }

Fix:
final ActorRef frontend = system . actorOf ( Props . create ( FrontendActor . class ) , "frontend" ) ;