nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CmdRemoveOwner implements NerdPlotCommand { private final NerdPlotPlugin plugin ; private static final String name = "removeowner" ; private static final String permission = "nerdplot.removeowner" ; public CmdRemoveOwner ( NerdPlotPlugin plugin ) { } @ Override public void execute ( CommandSender sender , String [ ] args ) { if ( ! ( sender . hasPermission ( CmdRemoveOwner . permission ) ) ) { plugin . printUsage ( sender ) ; return ; } if ( ( args . length ) != 0 ) { printUsage ( sender ) ; return ; } PlayerHelper ph = new PlayerHelper ( plugin , sender ) ; if ( ! ( ph . isInitialized ( ) ) ) { return ; } ProtectedRegion plot = ph . getPlot ( ) ; if ( plot == null ) { sender . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>must<seq2seq4repair_space>stand<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>plot<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>the<seq2seq4repair_space>owner<seq2seq4repair_space>from" ) ) ; return ; } PlotInfo pinfo = plugin . getPlotInfo ( ph . getWorldName ( ) , plot . getId ( ) ) ; if ( ( pinfo . ownerID ) == null ) { <START_BUG> sender . sendMessage ( ( ( ChatColor . RED ) + "This<seq2seq4repair_space>plot<seq2seq4repair_space>does<seq2seq4repair_space>already<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>an<seq2seq4repair_space>owner" ) ) ; <END_BUG> } else { plot . getOwners ( ) . removePlayer ( UUID . fromString ( pinfo . ownerID ) ) ; plugin . setPlotOwner ( ph . getWorldName ( ) , plot . getId ( ) , null , null ) ; plugin . saveConfig ( ) ; sender . sendMessage ( ( ( ( ( ChatColor . GREEN ) + ( pinfo . ownerName ) ) + "<seq2seq4repair_space>removed<seq2seq4repair_space>from<seq2seq4repair_space>plot<seq2seq4repair_space>" ) + ( plot . getId ( ) ) ) ) ; } } @ Override public String getName ( ) { } @ Override public void printUsage ( CommandSender sender ) { } }

Fix:
sender . sendMessage ( ( ( ChatColor . RED ) + "This<seq2seq4repair_space>plot<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>an<seq2seq4repair_space>owner." ) ) ;
Buggy code:
public class NewTaskActivity extends Activity implements OnDateSetListener , OnClickListener , OnStudentsVerifiedListener { private static final String TAG = NewTaskActivity . class . getSimpleName ( ) ; private Task task ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_new_task ) ; if ( savedInstanceState != null ) task = ( ( Task ) ( savedInstanceState . getSerializable ( EXTRA_TASKNAME ) ) ) ; else task = DataHandler . GetInstance ( ) . createTask ( ) ; Button btn = ( ( Button ) ( findViewById ( BTN_newTask_create ) ) ) ; btn . setOnClickListener ( this ) ; btn = ( ( Button ) ( findViewById ( BTN_newTask_date ) ) ) ; btn . setOnClickListener ( this ) ; EditText eText = ( ( EditText ) ( findViewById ( ET_newTask_date ) ) ) ; eText . setText ( BaseActivity . GetDateAsString ( Calendar . getInstance ( ) . getTime ( ) ) ) ; AddClassToTaskFragment fragment = new AddClassToTaskFragment ( ) ; Bundle args = new Bundle ( ) ; <START_BUG> args . putString ( EXTRA_TASKNAME , task . getName ( ) ) ; <END_BUG> ViewGroupAdapter . beginFragmentTransaction ( getFragmentManager ( ) , fragment , args , LL_newTask_classes ) ; } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onClick ( View v ) { } private boolean createNewTask ( View v ) { } @ Override public void onDateSet ( DatePicker picker , int year , int monthOfYear , int dayOfMonth ) { } @ Override public void onStudentsVerified ( Task task ) { } @ Override public void addStudent ( Student std ) { } @ Override public void removeStudent ( Student std ) { } }

Fix:
args . putSerializable ( EXTRA_TASKNAME , task ) ;
Buggy code:
public final class Usage { private static final String NEW_LINE = String . format ( "%n" ) ; private final List < List < String > > arguments = new ArrayList < List < String > > ( ) ; private final List < String > instructions = new ArrayList < String > ( ) ; public String getDefaultUsageHeadline ( String executableBaseName ) { } public void addArguments ( String ... args ) { } public void addInstruction ( String instruction ) { } public String usage ( String headline ) { final StringBuilder sb = new StringBuilder ( ) ; <START_BUG> sb . append ( Usage . NEW_LINE ) . append ( MESSAGES . argUsage ( headline ) ) . append ( Usage . NEW_LINE ) ; <END_BUG> for ( int i = 0 ; i < ( arguments . size ( ) ) ; i ++ ) { sb . append ( getCommand ( i ) ) . append ( Usage . NEW_LINE ) ; } return sb . toString ( ) ; } private String getCommand ( int i ) { } private static void segmentArguments ( List < String > input , List < String > output , int depth ) { } private static void segmentInstructions ( String instructions , List < String > segments ) { } private static String getSystemProperty ( final String key ) { } }

Fix:
sb . append ( Usage . NEW_LINE ) . append ( headline ) . append ( Usage . NEW_LINE ) ;
Buggy code:
public class ARecord extends Record { private static ARecord member = new ARecord ( ) ; private byte [ ] addr ; private ARecord ( ) { } private ARecord ( Name name , short dclass , int ttl ) { } static ARecord getMember ( ) { } public ARecord ( Name name , short dclass , int ttl , InetAddress address ) throws IOException { } Record rrFromWire ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in ) throws IOException { ARecord rec = new ARecord ( name , dclass , ttl ) ; if ( in == null ) return rec ; rec . addr = new byte [ 4 ] ; <START_BUG> in . read ( addr ) ; <END_BUG> return rec ; } Record rdataFromString ( Name name , short dclass , int ttl , MyStringTokenizer st , Name origin ) throws TextParseException { } public String rdataToString ( ) { } public InetAddress getAddress ( ) { } void rrToWire ( DataByteOutputStream out , Compression c ) throws IOException { } }

Fix:
in . read ( rec . addr ) ;
Buggy code:
public class ReplyAsAttachmentAction extends FrameAction implements SelectionListener { public ReplyAsAttachmentAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameController ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new org . columba . mail . gui . composer . command . ReplyAsAttachmentCommand ( r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class DeploymentDescriptorMethodProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final DeploymentReflectionIndex index = deploymentUnit . getAttachment ( REFLECTION_INDEX ) ; final EEApplicationClasses applicationClassesDescription = deploymentUnit . getAttachment ( EE_APPLICATION_CLASSES_DESCRIPTION ) ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; final EEModuleDescription eeModuleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; for ( final ComponentDescription component : eeModuleDescription . getComponentDescriptions ( ) ) { if ( component instanceof EJBComponentDescription ) { final EJBComponentDescription ejb = ( ( EJBComponentDescription ) ( component ) ) ; if ( ( ( ! ( ejb . getAroundInvokeDDMethods ( ) . isEmpty ( ) ) ) || ( ! ( ejb . getPostConstructDDMethods ( ) . isEmpty ( ) ) ) ) || ( ! ( ejb . getPreDestroyDDMethods ( ) . isEmpty ( ) ) ) ) { if ( 0 == 0 ) { <START_BUG> throw new RuntimeException ( "FIXME" ) ; <END_BUG> } } } } } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
return ;
Buggy code:
public class TestBugInSomething extends BaseTokenStreamTestCase { public void test ( ) throws Exception { final CharArraySet cas = new CharArraySet ( TEST_VERSION_CURRENT , 3 , false ) ; cas . add ( "jjp" ) ; cas . add ( "wlmwoknt" ) ; cas . add ( "tcgyreo" ) ; final NormalizeCharMap . Builder builder = new NormalizeCharMap . Builder ( ) ; builder . add ( "mtqlpi" , "" ) ; builder . add ( "mwoknt" , "jjp" ) ; builder . add ( "tcgyreo" , "zpfpajyws" ) ; final NormalizeCharMap map = builder . build ( ) ; Analyzer a = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer t = new org . apache . lucene . analysis . MockTokenizer ( new TestRandomChains . CheckThatYouDidntReadAnythingReaderWrapper ( reader ) , MockTokenFilter . ENGLISH_STOPSET , false , ( - 65 ) ) ; TokenFilter f = new org . apache . lucene . analysis . commongrams . CommonGramsFilter ( TEST_VERSION_CURRENT , t , cas ) ; return new TokenStreamComponents ( t , f ) ; } @ Override <START_BUG> protected Reader initReader ( Reader reader ) { <END_BUG> reader = new MockCharFilter ( reader , 0 ) ; reader = new org . apache . lucene . analysis . charfilter . MappingCharFilter ( map , reader ) ; return reader ; } } ; checkAnalysisConsistency ( random ( ) , a , false , "wmgddzunizdomqyj" ) ; } CharStream wrappedStream = new CharStream ( ) { @ Override public void mark ( int readAheadLimit ) throws IOException { } @ Override public boolean markSupported ( ) { } @ Override public int read ( ) throws IOException { } @ Override public int read ( char [ ] cbuf ) throws IOException { } @ Override public int read ( CharBuffer target ) throws IOException { } @ Override public boolean ready ( ) throws IOException { } @ Override public void reset ( ) throws IOException { } @ Override public long skip ( long n ) throws IOException { } @ Override public int correctOffset ( int currentOff ) { } @ Override public void close ( ) throws IOException { } @ Override public int read ( char [ ] arg0 , int arg1 , int arg2 ) throws IOException { } } ; public void testWrapping ( ) throws Exception { } }

Fix:
protected Reader initReader ( String fieldName , Reader reader ) {
Buggy code:
public class DiagramPanel extends JPanel { private GUI gui ; private NJClass selected ; private boolean inheriting ; public boolean getInheriting ( ) { } public void setInheriting ( boolean inheriting ) { } public NJClass getSelected ( ) { } public void setSelected ( NJClass selected ) { if ( inheriting ) { <START_BUG> if ( selected == null ) { <END_BUG> this . selected . setInherits ( null ) ; } else if ( ( selected != null ) && ( ( this . selected . getInherits ( ) ) != null ) ) { this . selected . getInherits ( ) . setTo ( selected ) ; } } this . selected = selected ; } public DiagramPanel ( GUI g ) { } public void paintComponent ( Graphics g ) { } public NJClass findNearestClass ( int x , int y ) { } public void unselectAll ( ) { } }

Fix:
if ( ( selected == null ) && ( ( this . selected ) != null ) ) {
Buggy code:
public class TDistributionTest extends ContinuousDistributionAbstractTest { public TDistributionTest ( String name ) { } @ Override public TDistribution makeDistribution ( ) { } @ Override public double [ ] makeCumulativeTestPoints ( ) { } @ Override public double [ ] makeCumulativeTestValues ( ) { } @ Override public double [ ] makeDensityTestValues ( ) { } @ Override protected void setUp ( ) throws Exception { } public void testCumulativeProbabilityAgaintStackOverflow ( ) throws Exception { } public void testSmallDf ( ) throws Exception { } public void testInverseCumulativeProbabilityExtremes ( ) throws Exception { } public void testDfAccessors ( ) { } public void testPreconditions ( ) { try { <START_BUG> TDistribution dist = new TDistributionImpl ( 0 ) ; <END_BUG> fail ( "Expecting<seq2seq4repair_space>NotStrictlyPositiveException<seq2seq4repair_space>for<seq2seq4repair_space>df<seq2seq4repair_space>=<seq2seq4repair_space>0" ) ; } catch ( NotStrictlyPositiveException ex ) { } } }

Fix:
new TDistributionImpl ( 0 ) ;
Buggy code:
public class HTTPSampleResult extends SampleResult { private static final long serialVersionUID = 240L ; private String cookies = "" ; private String method ; private String redirectLocation ; private String queryString = "" ; private static final String HTTP_NO_CONTENT_CODE = Integer . toString ( HttpURLConnection . HTTP_NO_CONTENT ) ; private static final String HTTP_NO_CONTENT_MSG = "No<seq2seq4repair_space>Content" ; public HTTPSampleResult ( ) { } public HTTPSampleResult ( long elapsed ) { } public HTTPSampleResult ( HTTPSampleResult res ) { } public void setHTTPMethod ( String method ) { } public String getHTTPMethod ( ) { } public void setRedirectLocation ( String redirectLocation ) { } public String getRedirectLocation ( ) { } public boolean isRedirect ( ) { } @ Override public String getSamplerData ( ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( method ) ; URL u = super . getURL ( ) ; if ( u != null ) { sb . append ( '<seq2seq4repair_space>' ) ; sb . append ( u . toString ( ) ) ; sb . append ( "\n" ) ; if ( ( POST . equals ( method ) ) || ( PUT . equals ( method ) ) ) { <START_BUG> sb . append ( "\nPOST<seq2seq4repair_space>data:\n" ) ; <END_BUG> sb . append ( queryString ) ; sb . append ( "\n" ) ; } if ( ( cookies . length ( ) ) > 0 ) { sb . append ( "\nCookie<seq2seq4repair_space>Data:\n" ) ; sb . append ( cookies ) ; } else { sb . append ( "\n[no<seq2seq4repair_space>cookies]" ) ; } sb . append ( "\n" ) ; } final String sampData = super . getSamplerData ( ) ; if ( sampData != null ) { sb . append ( sampData ) ; } return sb . toString ( ) ; } public String getCookies ( ) { } public void setCookies ( String string ) { } public String getQueryString ( ) { } public void setQueryString ( String string ) { } @ Override public String getDataEncodingWithDefault ( ) { } public void setResponseNoContent ( ) { } }

Fix:
sb . append ( ( ( "\n" + ( method ) ) + "<seq2seq4repair_space>data:\n" ) ) ;
Buggy code:
public class AttributeModifierComponentTest extends TestCase { private static final Logger log = LoggerFactory . getLogger ( AttributeModifierComponentTest . class ) ; private WicketTester tester ; public AttributeModifierComponentTest ( final String name ) { } @ Override protected void setUp ( ) throws Exception { } @ Override protected void tearDown ( ) throws Exception { } public void testComponentTagAttributeModification ( ) throws Exception { <START_BUG> String document = tester . getLastResponse ( ) . getTextResponse ( ) . toString ( ) ; <END_BUG> AttributeModifierComponentTest . log . info ( document ) ; Assert . assertTrue ( validateDocument ( document ) ) ; } private boolean validateDocument ( String document ) { } }

Fix:
String document = tester . getLastResponseAsString ( ) ;
Buggy code:
public class SnapsRunnable extends PostsRunnable < Snap > { public SnapsRunnable ( Context context , PostsHandler < Snap > handler , List < Snap > listOfPosts , Map < String , Bitmap > userIcons ) { } public void run ( ) { try { JSONObject postsJSON = _forrst . postsList ( "snap" , null ) ; JSONArray postsJSONArray = ( ( JSONArray ) ( postsJSON . get ( "posts" ) ) ) ; for ( int count = 0 ; count < ( postsJSONArray . length ( ) ) ; count ++ ) { JSONObject json = postsJSONArray . getJSONObject ( count ) ; Map < String , String > properties = new HashMap < String , String > ( ) ; properties . put ( "id" , json . getString ( "id" ) ) ; properties . put ( "created_at" , getPostDate ( json ) ) ; properties . put ( "name" , json . getJSONObject ( "user" ) . getString ( "name" ) ) ; properties . put ( "title" , json . getString ( "title" ) ) ; properties . put ( "url" , json . getString ( "url" ) ) ; properties . put ( "description" , json . getString ( "description" ) ) ; properties . put ( "view_count" , Integer . toString ( json . getInt ( "view_count" ) ) ) ; properties . put ( "like_count" , json . getString ( "like_count" ) ) ; properties . put ( "comment_count" , json . getString ( "comment_count" ) ) ; <START_BUG> properties . put ( "user_photos_thumb_url" , json . getJSONObject ( "user" ) . getJSONObject ( "photos" ) . getString ( "thumb_url" ) ) ; <END_BUG> properties . put ( "large_small_url" , json . getJSONObject ( "snaps" ) . getString ( "large_url" ) ) ; Snap snap = new Snap ( properties ) ; _listOfPosts . add ( snap ) ; fetchUserIcon ( snap ) ; } notifyHandler ( ) ; } catch ( JSONException e ) { throw new RuntimeException ( "Error<seq2seq4repair_space>fetching<seq2seq4repair_space>snap<seq2seq4repair_space>from<seq2seq4repair_space>Forrst" , e ) ; } } No newline ; at end ; of file ; }

Fix:
properties . put ( "user_photos_thumb_url" , json . getJSONObject ( "user" ) . getJSONObject ( "photos" ) . getString ( "medium_url" ) ) ;
Buggy code:
public class AudioLayersPanel extends JPanel implements LayerGroupListener , AudioLayerListener , LayerGroupPanel < AudioLayerGroup > , PropertyChangeListener { private static Font renderFont = new Font ( "Dialog" , Font . BOLD , 12 ) ; private static final Color PATTERN_COLOR = new Color ( 198 , 226 , 255 ) ; private AudioLayerGroup layerGroup ; private final TimeState timeState ; private PropertyChangeListener heightListener ; AffineTransform transform = new AffineTransform ( ) ; AffineTransform reverseTransform = new AffineTransform ( ) ; double [ ] srcPts = new double [ 4 ] ; double [ ] destPts = new double [ 4 ] ; Map < AudioClip , AudioClipPanel > clipPanelMap = new HashMap < > ( ) ; private final InstanceContent content ; public AudioLayersPanel ( AudioLayerGroup layerGroup , TimeState timeState , InstanceContent content ) { } public AudioLayerGroup getAudioLayerGroup ( ) { } public TimeState getTimeState ( ) { } @ Override public void addNotify ( ) { } @ Override public void removeNotify ( ) { } @ Override public void layerGroupChanged ( final LayerGroupDataEvent event ) { } protected Dimension checkSize ( ) { } @ Override public void propertyChange ( PropertyChangeEvent evt ) { } @ Override public void paintComponent ( Graphics g ) { } @ Override public void marqueeSelectionPerformed ( SelectionMarquee marquee ) { } @ Override public void paintNavigatorView ( Graphics2D g2d ) { } private void paintAudioLayersBackground ( Graphics g ) { } protected Rectangle getAudioLayerRect ( AudioLayer layer ) { } @ Override public void audioClipAdded ( final AudioLayer source , final AudioClip clip ) { } @ Override public void audioClipRemoved ( final AudioLayer source , final AudioClip clip ) { } private void addClipPanel ( AudioClip clip , TimeState timeState , int y , int height ) { AudioClipPanel panel = new AudioClipPanel ( clip , timeState ) ; panel . setBounds ( panel . getX ( ) , y , panel . getWidth ( ) , height ) ; <START_BUG> add ( panel ) ; <END_BUG> clipPanelMap . put ( clip , panel ) ; } private void removeClipPanel ( AudioClip clip ) { } private void updateAudioClipYandHeight ( ) { } @ Override public ScoreObjectView getScoreObjectViewAtPoint ( Point p ) { } @ Override public Action [ ] getLayerActions ( ) { } @ Override public AudioLayerGroup getLayerGroup ( ) { } }

Fix:
add ( panel , 0 ) ;
Buggy code:
public class TestCzechAnalyzer extends BaseTokenStreamTestCase { public void testStopWord ( ) throws Exception { } public void testReusableTokenStream ( ) throws Exception { } public void testWithStemExclusionSet ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new CzechAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new CzechAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public final class IndexStructClassic extends IndexStructAbs { private HashTableIndex map ; private static Logger logger = Logger . getLogger ( IndexStructClassic . class ) ; public IndexStructClassic ( String idStorage , String idTestVector , ConfigServer configStore , int testVector , Object database ) throws ReadIndexException , StartIndexException { } public boolean isCompressIndexEnabled ( ) { } public void delete ( Map < Long , Integer > mapID ) { } public void put ( ConcurrentHashMap < String , Long > visualWords , Long I ) { for ( Map . Entry < String , Long > entry : visualWords . entrySet ( ) ) { ValueStructure valueStruct = map . get ( entry . getKey ( ) ) ; <START_BUG> if ( ( ! ( isCompressIndexEnabled ( ) ) ) || ( ! ( compressIndex . isBlackListed ( entry . getKey ( ) ) ) ) ) { <END_BUG> if ( valueStruct == null ) { valueStruct = new ValueStructure ( configStore ) ; } if ( addListIndex ( valueStruct , I , entry . getValue ( ) . intValue ( ) ) ) { if ( ( ! ( isCompressIndexEnabled ( ) ) ) || ( ! ( compressIndex . isNBTTooBig ( valueStruct . getNBT ( ) ) ) ) ) { map . put ( entry . getKey ( ) , valueStruct ) ; } else { compressIndex . blacklistVW ( entry . getKey ( ) ) ; map . delete ( entry . getKey ( ) ) ; } } } } } public ConcurrentHashMap < String , Long > getNBT ( ConcurrentHashMap < String , Long > visualWord ) { } @ Override public Map < String , ValueStructure > getAll ( List < String > B ) { } public void closeIndex ( ) throws CloseIndexException { } public void sync ( ) { } public void printStat ( ) { } public boolean isRessourcePresent ( Long id ) { } }

Fix:
if ( ( ! ( isCompressIndexEnabled ( ) ) ) || ( ( isCompressIndexEnabled ( ) ) && ( ! ( compressIndex . isBlackListed ( entry . getKey ( ) ) ) ) ) ) {
Buggy code:
public class PostMethod implements IRequestMethod { @ Override public HttpResponse handle ( HttpRequest request , Server server ) { HttpResponse response = null ; String uri = request . getUri ( ) ; String rootDirectory = server . getRootDirectory ( ) ; <START_BUG> File file = new File ( ( rootDirectory + uri ) ) ; <END_BUG> String body = request . getBody ( ) . toString ( ) ; try { FileOutputStream fileOut = new FileOutputStream ( file ) ; fileOut . write ( body . getBytes ( ) ) ; fileOut . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } response = HttpResponseFactory . create200OK ( file , OPEN ) ; return response ; } public File createFile ( ) { } }

Fix:
File file = new File ( ( ( rootDirectory + ( System . getProperty ( "file.separator" ) ) ) + uri ) ) ;
Buggy code:
public class UMLExtendExtensionComboBoxModel extends UMLComboBoxModel2 { public UMLExtendExtensionComboBoxModel ( ) { } protected void buildModelList ( ) { } protected Object getSelectedModelElement ( ) { } <START_BUG> protected boolean isValidElement ( MBase element ) { <END_BUG> return element instanceof MUseCase ; } }

Fix:
protected boolean isValidElement ( Object element ) {
Buggy code:
public class FilterModel { private EventTypeEntryContainer eventContainer = new EventTypeEntryContainer ( ) ; public void processNewLoggingEvent ( LoggingEvent event ) { eventContainer . addLevel ( event . getLevel ( ) ) ; eventContainer . addLogger ( event . getLoggerName ( ) ) ; eventContainer . addThread ( event . getThreadName ( ) ) ; eventContainer . addNDC ( event . getNDC ( ) ) ; <START_BUG> eventContainer . addPropertyKeys ( event . getPropertyKeySet ( ) ) ; <END_BUG> if ( event . locationInformationExists ( ) ) { LocationInfo info = event . getLocationInformation ( ) ; eventContainer . addClass ( info . getClassName ( ) ) ; eventContainer . addMethod ( info . getMethodName ( ) ) ; eventContainer . addFileName ( info . getFileName ( ) ) ; } } public EventTypeEntryContainer getContainer ( ) { } }

Fix:
eventContainer . addProperties ( event . getProperties ( ) ) ;
Buggy code:
public class SimpleBrokerMessageHandlerTests { private SimpleBrokerMessageHandler messageHandler ; @ Mock private MessageChannel clientChannel ; @ Captor ArgumentCaptor < Message < ? > > messageCaptor ; @ Before public void setup ( ) { } @ Test public void subcribePublish ( ) { } @ Test public void subcribeDisconnectPublish ( ) { } @ Test public void connect ( ) { } protected Message < String > createSubscriptionMessage ( String sessionId , String subcriptionId , String destination ) { } protected Message < String > createConnectMessage ( String sessionId ) { SimpMessageHeaderAccessor headers = SimpMessageHeaderAccessor . create ( CONNECT ) ; headers . setSessionId ( sessionId ) ; <START_BUG> return MessageBuilder . withPayloadAndHeaders ( "" , headers ) . build ( ) ; <END_BUG> } protected Message < String > createMessage ( String destination , String payload ) { } protected boolean assertCapturedMessage ( String sessionId , String subcriptionId , String destination ) { } }

Fix:
return MessageBuilder . withPayload ( "" ) . setHeaders ( headers ) . build ( ) ;
Buggy code:
public class SimpleThreadScope implements Scope { private static final Log logger = LogFactory . getLog ( SimpleThreadScope . class ) ; private final ThreadLocal < Map < String , Object > > threadScope = new org . springframework . core . NamedThreadLocal < Map < String , Object > > ( "SimpleThreadScope" ) { @ Override protected Map < String , Object > initialValue ( ) { } } ; @ Override public Object get ( String name , ObjectFactory < ? > objectFactory ) { } @ Override public Object remove ( String name ) { } @ Override public void registerDestructionCallback ( String name , Runnable callback ) { <START_BUG> SimpleThreadScope . logger . warn ( ( "SimpleThreadScope<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>support<seq2seq4repair_space>descruction<seq2seq4repair_space>callbacks.<seq2seq4repair_space>" + "Consider<seq2seq4repair_space>using<seq2seq4repair_space>a<seq2seq4repair_space>RequestScope<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>Web<seq2seq4repair_space>environment." ) ) ; <END_BUG> } @ Override public Object resolveContextualObject ( String key ) { } @ Override public String getConversationId ( ) { } }

Fix:
SimpleThreadScope . logger . warn ( ( "SimpleThreadScope<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>support<seq2seq4repair_space>destruction<seq2seq4repair_space>callbacks.<seq2seq4repair_space>" + "Consider<seq2seq4repair_space>using<seq2seq4repair_space>a<seq2seq4repair_space>RequestScope<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>Web<seq2seq4repair_space>environment." ) ) ;
Buggy code:
public class SaveService { private static XStream saver = new XStream ( ) ; private static Logger log = LoggingManager . getLoggerForClass ( ) ; static String version = "1.0" ; static String propertiesVersion = "" ; private static final String PROPVERSION = "1.6" ; private static void makeAlias ( String alias , String clazz ) { } private static void initProps ( ) { } public static void saveTree ( HashTree tree , Writer writer ) throws Exception { } public static void saveElement ( Object el , Writer writer ) throws Exception { } public static Object loadElement ( InputStream in ) throws Exception { } public static Object loadElement ( Reader in ) throws Exception { } public static synchronized void saveSampleResult ( SampleResult res , Writer writer ) throws Exception { } public static synchronized void saveTestElement ( TestElement elem , Writer writer ) throws Exception { } static boolean versionsOK = true ; private static final String REVPFX = "$Revision:<seq2seq4repair_space>" ; private static final String REVSFX = "<seq2seq4repair_space>$" ; private static String extractVersion ( String rev ) { } private static void checkVersion ( Class clazz , String expected ) { } private static void checkVersions ( ) { } public static TestResultWrapper loadTestResults ( InputStream reader ) throws Exception { } public static HashTree loadTree ( InputStream reader ) throws Exception { if ( ! ( reader . markSupported ( ) ) ) { reader = new BufferedInputStream ( reader ) ; } reader . mark ( Integer . MAX_VALUE ) ; ScriptWrapper wrapper = null ; try { wrapper = ( ( ScriptWrapper ) ( SaveService . saver . fromXML ( new InputStreamReader ( reader ) ) ) ) ; return wrapper . testPlan ; } catch ( CannotResolveClassException e ) { <START_BUG> SaveService . log . warn ( "Problem<seq2seq4repair_space>loading<seq2seq4repair_space>new<seq2seq4repair_space>style:<seq2seq4repair_space>" , e ) ; <END_BUG> reader . reset ( ) ; return OldSaveService . loadSubTree ( reader ) ; } } public static class Test extends JMeterTestCase { public Test ( ) { } public Test ( String name ) { } public void testVersions ( ) throws Exception { } } }

Fix:
SaveService . log . warn ( ( "Problem<seq2seq4repair_space>loading<seq2seq4repair_space>new<seq2seq4repair_space>style:<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ;
Buggy code:
public class UrlConfigGui extends JPanel { protected HTTPArgumentsPanel argsPanel ; private static String DOMAIN = "domain" ; private static String PORT = "port" ; private static String PROTOCOL = "protocol" ; private static String PATH = "path" ; private static String FOLLOW_REDIRECTS = "follow_redirects" ; private static String USE_KEEPALIVE = "use_keepalive" ; private static String POST = "post" ; private static String GET = "get" ; private static String SEND_PARAM = "sendparam" ; private JTextField domain ; private JTextField port ; private JTextField protocol ; private JTextField path ; private JCheckBox followRedirects ; private JCheckBox useKeepAlive ; private JRadioButton post ; private JRadioButton get ; public UrlConfigGui ( ) { } protected void configureTestElement ( TestElement mc ) { } public TestElement createTestElement ( ) { } public void configureSampler ( HTTPSampler sampler ) { } public void configure ( TestElement el ) { setName ( el . getPropertyAsString ( NAME ) ) ; argsPanel . configure ( ( ( TestElement ) ( el . getProperty ( ARGUMENTS ) . getObjectValue ( ) ) ) ) ; domain . setText ( el . getPropertyAsString ( HTTPSampler . DOMAIN ) ) ; String portString = ( ( String ) ( el . getPropertyAsString ( HTTPSampler . PORT ) ) ) ; if ( portString . equals ( ( "" + ( HTTPSampler . UNSPECIFIED_PORT ) ) ) ) { port . setText ( "" ) ; } else { port . setText ( portString ) ; } protocol . setText ( el . getPropertyAsString ( HTTPSampler . PROTOCOL ) ) ; <START_BUG> if ( "POST" . equals ( el . getProperty ( METHOD ) ) ) { <END_BUG> post . setSelected ( true ) ; get . setSelected ( false ) ; } else { get . setSelected ( true ) ; post . setSelected ( false ) ; } path . setText ( el . getPropertyAsString ( HTTPSampler . PATH ) ) ; followRedirects . setSelected ( ( ( AbstractTestElement ) ( el ) ) . getPropertyAsBoolean ( HTTPSampler . FOLLOW_REDIRECTS ) ) ; useKeepAlive . setSelected ( ( ( AbstractTestElement ) ( el ) ) . getPropertyAsBoolean ( HTTPSampler . USE_KEEPALIVE ) ) ; } protected void init ( ) { } protected JPanel getPortPanel ( ) { } protected JPanel getDomainPanel ( ) { } protected JPanel getPathPanel ( ) { } protected JPanel getProtocolAndMethodPanel ( ) { } protected JPanel getParameterPanel ( ) { } }

Fix:
if ( "POST" . equals ( el . getPropertyAsString ( METHOD ) ) ) {
Buggy code:
public final class Time extends AbstractTime { private static final long serialVersionUID = 1L ; public static final Time START_OF_UNIX_TIME = Time . milliseconds ( 0 ) ; private static final SimpleDateFormat dateFormat = new SimpleDateFormat ( "yyyy.MM.dd" ) ; private static final SimpleDateFormat dateTimeFormat = new SimpleDateFormat ( "yyyy.MM.dd-h.mma" ) ; public static Time milliseconds ( final long time ) { } public static Time now ( ) { } public static Time parseDate ( final Calendar calendar , final String string ) throws ParseException { } public static Time parseDate ( final String string ) throws ParseException { } public static Time valueOf ( final Calendar calendar , final String string ) throws ParseException { } public static Time valueOf ( final Calendar calendar , final TimeOfDay timeOfDay ) { synchronized ( calendar ) { calendar . setTimeInMillis ( System . currentTimeMillis ( ) ) ; <START_BUG> calendar . set ( Calendar . HOUR , 0 ) ; <END_BUG> calendar . set ( Calendar . MINUTE , 0 ) ; calendar . set ( Calendar . SECOND , 0 ) ; calendar . set ( Calendar . MILLISECOND , 0 ) ; return Time . valueOf ( ( ( calendar . getTimeInMillis ( ) ) + ( timeOfDay . getMilliseconds ( ) ) ) ) ; } } public static Time valueOf ( final Date date ) { } public static Time valueOf ( final long time ) { } public static Time valueOf ( final String string ) throws ParseException { } public static Time valueOf ( final String string , final String pattern ) throws ParseException { } public static Time valueOf ( final TimeOfDay timeOfDay ) { } private Time ( final long time ) { } public Time add ( final Duration duration ) { } public Duration elapsedSince ( ) { } public Duration fromNow ( ) { } public int get ( final Calendar calendar , final int field ) { } public int get ( final int field ) { } public int getDayOfMonth ( ) { } public int getDayOfMonth ( final Calendar calendar ) { } public int getHour ( ) { } public int getHour ( final Calendar calendar ) { } public int getMinute ( ) { } public int getMinute ( final Calendar calendar ) { } public int getMonth ( ) { } public int getMonth ( final Calendar calendar ) { } public int getSecond ( ) { } public int getSecond ( final Calendar calendar ) { } public int getYear ( ) { } public int getYear ( final Calendar calendar ) { } public Time subtract ( final Duration duration ) { } public Duration subtract ( final Time that ) { } public Date toDate ( ) { } public String toDateString ( ) { } public String toDateString ( final Calendar calendar ) { } @ Override public String toString ( ) { } public String toString ( final Calendar calendar , final String format ) { } public String toString ( final String format ) { } }

Fix:
calendar . set ( Calendar . HOUR_OF_DAY , 0 ) ;
Buggy code:
public class StatelessSessionComponent extends SessionBeanComponent implements PooledComponent < StatelessSessionComponentInstance > { private final Pool < StatelessSessionComponentInstance > pool ; private final String poolName ; private final Method timeoutMethod ; private final Affinity weakAffinity ; public StatelessSessionComponent ( final StatelessSessionComponentCreateService slsbComponentCreateService ) { } @ Override protected BasicComponentInstance instantiateComponentInstance ( AtomicReference < ManagedReference > instanceReference , Interceptor preDestroyInterceptor , Map < Method , Interceptor > methodInterceptors , final InterceptorFactoryContext interceptorContext ) { } @ Override public Pool < StatelessSessionComponentInstance > getPool ( ) { } @ Override public String getPoolName ( ) { } @ Override public Method getTimeoutMethod ( ) { } public Affinity getWeakAffinity ( ) { } @ Override public void start ( ) { } @ Override public void stop ( ) { } @ Override public AllowedMethodsInformation getAllowedMethodsInformation ( ) { <START_BUG> return StatelessAllowedMethodsInformation . INSTANCE ; <END_BUG> } }

Fix:
return isBeanManagedTransaction ( ) ? StatelessAllowedMethodsInformation . INSTANCE_BMT : StatelessAllowedMethodsInformation . INSTANCE_CMT ;
Buggy code:
public class CharScreenController implements ScreenController { private Nifty nifty ; private Screen screen ; private ListBox < String > listBox ; private final StateBasedGame game ; private Label statusLabel ; public CharScreenController ( StateBasedGame game ) { } @ SuppressWarnings ( "unchecked" ) @ Override public void bind ( Nifty nifty , Screen screen ) { } @ Override public void onStartScreen ( ) { } @ Override public void onEndScreen ( ) { } private void fillMyListBox ( ) { } public void play ( ) { boolean found = Login . getInstance ( ) . selectCharacter ( listBox . getFocusItemIndex ( ) ) ; if ( ! found ) { statusLabel . setText ( "No<seq2seq4repair_space>character<seq2seq4repair_space>selected" ) ; statusLabel . getElement ( ) . getParent ( ) . layoutElements ( ) ; return ; } <START_BUG> game . enterState ( STATE_LOADING , new FadeOutTransition ( ) , new FadeInTransition ( ) ) ; <END_BUG> } public void logout ( ) { } }

Fix:
game . enterState ( STATE_LOADING , new FadeOutTransition ( ) , null ) ;
Buggy code:
public abstract class AbstractMachine implements IMachine { protected int labelNum = 0 ; protected int getLabelNum ( ) { } protected int globalNum = 0 ; protected int getGlobalNum ( ) { } protected String initCode = "" ; protected String endCode = "" ; private HashMap < String , HashSet < String > > callTree = new HashMap < > ( ) ; @ Override public void writeCode ( String fname , EntityList entities ) throws MOCException { } protected boolean shouldInclude ( EntityCode entity , HashSet < String > usedFunctions ) { } protected HashSet < String > usedFunctions ( ) { HashSet < String > list = new HashSet < > ( ) ; list . add ( "main" ) ; HashSet < String > newCallers = new HashSet < > ( ) ; do { newCallers . clear ( ) ; for ( String caller : list ) { if ( callTree . containsKey ( caller ) ) { for ( String callee : callTree . get ( caller ) ) { if ( ! ( list . contains ( callee ) ) ) { newCallers . add ( callee ) ; } } } } list . addAll ( newCallers ) ; <START_BUG> } while ( newCallers . isEmpty ( ) ) ; <END_BUG> return list ; } public Code genFunctionCall ( String currentFunc , TFUNCTION f , Code arguments ) { } protected abstract Code genFunctionCallImpl ( TFUNCTION f , Code arguments ) { } public Location genGlobalLocation ( ) { } public String genComment ( String comm ) { } protected String asmVariablePattern ( ) { } private String genAsmImpl ( String asmCode , ST symbolsTable ) { } public Code genAsm ( String asmCode , ST symbolsTable ) { } public AsmCode genGlobalAsm ( String asmCode , ST symbolsTable ) { } public List < Integer > getArrayFromString ( String txt ) { } public int getCharFromString ( String c ) { } public int getIntFromString ( String c ) { } }

Fix:
} while ( ! ( newCallers . isEmpty ( ) ) ) ;
Buggy code:
public class XmlPullParserTest extends TestCase { public final void testBasics ( ) throws Exception { } public final void testEncoding ( ) throws Exception { } public final void testAttributes ( ) throws Exception { } public final void testComments ( ) throws Exception { } public final void testCompressWhitespace ( ) throws Exception { } public final void testScript ( ) throws Exception { } public final void testConditionalComments ( ) throws Exception { } public final void testConditionalComments2 ( ) throws Exception { final XmlPullParser parser = new XmlPullParser ( ) ; parser . parse ( "<!--[if<seq2seq4repair_space>IE]><a<seq2seq4repair_space>href='test.html'>my<seq2seq4repair_space>link<//a><![endif]-->" ) ; HttpTagType type = parser . next ( ) ; assertEquals ( type , CONDITIONAL_COMMENT ) ; type = parser . next ( ) ; assertEquals ( type , TAG ) ; assertTrue ( parser . getElement ( ) . isOpen ( ) ) ; type = parser . next ( ) ; assertEquals ( type , BODY ) ; type = parser . next ( ) ; assertEquals ( type , TAG ) ; assertEquals ( "a" , parser . getElement ( ) . getName ( ) ) ; assertTrue ( parser . getElement ( ) . isClose ( ) ) ; type = parser . next ( ) ; <START_BUG> assertEquals ( type , CONDITIONAL_COMMENT ) ; <END_BUG> type = parser . next ( ) ; assertEquals ( type , NOT_INITIALIZED ) ; } public final void testNames ( ) throws Exception { } public final void testDoctype ( ) throws Exception { } public final void testDownlevelRevealedConditionalComments ( ) throws Exception { } }

Fix:
assertEquals ( type , CONDITIONAL_COMMENT_ENDIF ) ;
Buggy code:
public class WorkbenchServiceRegistry { private static final String EXT_ID_SERVICES = "org.eclipse.ui.services" ; private static WorkbenchServiceRegistry registry = null ; public static WorkbenchServiceRegistry getRegistry ( ) { } public static final IServiceLocator GLOBAL_PARENT = new IServiceLocator ( ) { public Object getService ( Class api ) { } public boolean hasService ( Class api ) { } } ; private Map factories = new HashMap ( ) ; public Object getService ( Class key , IServiceLocator parentLocator , IServiceLocator locator ) { } private Object loadFromRegistry ( Class key , IServiceLocator parentLocator , IServiceLocator locator ) { Object service = null ; IExtensionRegistry reg = Platform . getExtensionRegistry ( ) ; IExtensionPoint ep = reg . getExtensionPoint ( WorkbenchServiceRegistry . EXT_ID_SERVICES ) ; IConfigurationElement [ ] serviceFactories = ep . getConfigurationElements ( ) ; try { final String requestedName = key . getName ( ) ; boolean done = false ; for ( int i = 0 ; ( i < ( serviceFactories . length ) ) && ( ! done ) ; i ++ ) { final IConfigurationElement [ ] serviceNames = serviceFactories [ i ] . getChildren ( TAG_SERVICE ) ; for ( int j = 0 ; ( j < ( serviceNames . length ) ) && ( ! done ) ; j ++ ) { String serviceName = serviceNames [ j ] . getAttribute ( ATTR_SERVICE_CLASS ) ; if ( requestedName . equals ( serviceName ) ) { done = true ; } } if ( done ) { final AbstractServiceFactory f = ( ( AbstractServiceFactory ) ( serviceFactories [ i ] . createExecutableExtension ( ATTR_FACTORY_CLASS ) ) ) ; <START_BUG> for ( int j = 0 ; ( j < ( serviceNames . length ) ) && ( ! done ) ; j ++ ) { <END_BUG> String serviceName = serviceNames [ j ] . getAttribute ( ATTR_SERVICE_CLASS ) ; if ( factories . containsKey ( serviceName ) ) { WorkbenchPlugin . log ( ( "Factory<seq2seq4repair_space>already<seq2seq4repair_space>exists<seq2seq4repair_space>for<seq2seq4repair_space>" + serviceName ) ) ; } else { factories . put ( serviceName , f ) ; } } service = f . create ( key , parentLocator , locator ) ; } } } catch ( CoreException e ) { StatusManager . getManager ( ) . handle ( e . getStatus ( ) ) ; } return service ; } }

Fix:
for ( int j = 0 ; j < ( serviceNames . length ) ; j ++ ) {
Buggy code:
public class MoveMessageAction extends AbstractColumbaAction implements SelectionListener { public MoveMessageAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> SelectFolderDialog dialog = treeModel . getSelectFolderDialog ( ) ; <END_BUG> if ( dialog . success ( ) ) { MessageFolder destFolder = dialog . getSelectedFolder ( ) ; FolderCommandReference [ ] result = new FolderCommandReference [ 2 ] ; FolderCommandReference [ ] r1 = ( ( org . columba . mail . gui . frame . MailFrameMediator ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; FolderCommandReference r2 = new FolderCommandReference ( destFolder ) ; result [ 0 ] = r1 [ 0 ] ; result [ 1 ] = r2 ; MoveMessageCommand c = new MoveMessageCommand ( result ) ; processor . addOp ( c ) ; } } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
SelectFolderDialog dialog = new SelectFolderDialog ( getFrameMediator ( ) ) ;
Buggy code:
public class PlayerJoinEventListener { @ Subscribe public void onPlayerJoinEvent ( PlayerJoinEvent event ) { <START_BUG> com . greatmancode . tools . events . playerEvent . PlayerJoinEvent pEvent = new com . greatmancode . tools . events . playerEvent . PlayerJoinEvent ( new com . greatmancode . tools . entities . Player ( event . getPlayer ( ) . getName ( ) , event . getPlayer ( ) . getDisplayName ( ) , event . getPlayer ( ) . getWorld ( ) . getName ( ) , null ) ) ; <END_BUG> EventManager . getInstance ( ) . callEvent ( pEvent ) ; } }

Fix:
com . greatmancode . tools . events . playerEvent . PlayerJoinEvent pEvent = new com . greatmancode . tools . events . playerEvent . PlayerJoinEvent ( new com . greatmancode . tools . entities . Player ( event . getPlayer ( ) . getName ( ) , event . getPlayer ( ) . getDisplayName ( ) . toString ( ) , event . getPlayer ( ) . getWorld ( ) . getName ( ) , null ) ) ;
Buggy code:
public class LoopHoleConnectionTask implements IPieEventTask < LoopHoleConnectionMessage > { private LoopHoleConnectionMessage msg ; private ILoopHoleService loopHoleService ; private boolean isWaitingForAck = false ; private boolean stop = false ; private String host ; private int port ; private IBeanService beanService ; @ Override public void setEvent ( LoopHoleConnectionMessage msg ) { } public IBeanService getBeanService ( ) { } public void setBeanService ( IBeanService beanService ) { } public void setLoopHoleService ( ILoopHoleService longHoleService ) { } public void setMsg ( LoopHoleConnectionMessage msg ) { } @ Override public void run ( ) { int endpoint = 0 ; while ( ! ( stop ) ) { if ( endpoint == 0 ) { host = msg . getClientPrivateIP ( ) ; port = msg . getClientPrivatePort ( ) ; endpoint ++ ; } else { host = msg . getClientPublicIP ( ) ; port = msg . getClientPublicPort ( ) ; endpoint = 0 ; } LoopHolePunchMessage punchMsg = beanService . getBean ( LoopHolePunchMessage . class ) ; punchMsg . setTo ( msg . getFromId ( ) ) ; punchMsg . setFrom ( loopHoleService . getClientID ( ) ) ; punchMsg . setName ( loopHoleService . getName ( ) ) ; loopHoleService . addInWaitFromAckQueu ( msg . getFromId ( ) , this ) ; <START_BUG> loopHoleService . send ( msg , host , port ) ; <END_BUG> isWaitingForAck = true ; try { Thread . sleep ( 500 ) ; } catch ( InterruptedException ex ) { PieLogger . error ( this . getClass ( ) , "Error<seq2seq4repair_space>while<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>ACK" , ex ) ; } isWaitingForAck = false ; loopHoleService . removeTaskFromAckWaitQueue ( msg . getFromId ( ) ) ; } } public void ackArrived ( ) { } }

Fix:
loopHoleService . send ( punchMsg , host , port ) ;
Buggy code:
public class XSWildcardDecl implements XSWildcard { public static final String ABSENT = null ; public short fType = NSCONSTRAINT_ANY ; public short fProcessContents = PC_STRICT ; public String [ ] fNamespaceList ; public XSObjectList fAnnotations = null ; public boolean allowNamespace ( String namespace ) { } public boolean isSubsetOf ( XSWildcardDecl superWildcard ) { } public boolean weakerProcessContents ( XSWildcardDecl superWildcard ) { } public XSWildcardDecl performUnionWith ( XSWildcardDecl wildcard , short processContents ) { } public XSWildcardDecl performIntersectionWith ( XSWildcardDecl wildcard , short processContents ) { } private boolean areSame ( XSWildcardDecl wildcard ) { } String [ ] intersect2sets ( String [ ] one , String [ ] theOther ) { } String [ ] union2sets ( String [ ] one , String [ ] theOther ) { } boolean subset2sets ( String [ ] subSet , String [ ] superSet ) { } boolean elementInSet ( String ele , String [ ] set ) { } private String fDescription = null ; public String toString ( ) { if ( ( fDescription ) == null ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( "WC[" ) ; switch ( fType ) { case NSCONSTRAINT_ANY : buffer . append ( ATTVAL_TWOPOUNDANY ) ; break ; case NSCONSTRAINT_NOT : buffer . append ( ATTVAL_TWOPOUNDOTHER ) ; buffer . append ( ":\"" ) ; if ( ( fNamespaceList [ 0 ] ) != null ) buffer . append ( fNamespaceList [ 0 ] ) ; buffer . append ( "\"" ) ; break ; case NSCONSTRAINT_LIST : if ( ( fNamespaceList . length ) == 0 ) break ; buffer . append ( "\"" ) ; if ( ( fNamespaceList [ 0 ] ) != null ) buffer . append ( fNamespaceList [ 0 ] ) ; buffer . append ( "\"" ) ; for ( int i = 1 ; i < ( fNamespaceList . length ) ; i ++ ) { buffer . append ( ",\"" ) ; if ( ( fNamespaceList [ i ] ) != null ) buffer . append ( fNamespaceList [ i ] ) ; buffer . append ( "\"" ) ; } break ; } <START_BUG> buffer . append ( "]" ) ; <END_BUG> fDescription = buffer . toString ( ) ; } return fDescription ; } public short getType ( ) { } public String getName ( ) { } public String getNamespace ( ) { } public short getConstraintType ( ) { } public StringList getNsConstraintList ( ) { } public short getProcessContents ( ) { } public String getProcessContentsAsString ( ) { } public XSAnnotation getAnnotation ( ) { } public XSObjectList getAnnotations ( ) { } public XSNamespaceItem getNamespaceItem ( ) { } }

Fix:
buffer . append ( ']' ) ;