nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SuperReference extends ThisReference { public static final SuperReference Super = new SuperReference ( ) ; public SuperReference ( ) { } public SuperReference ( int pos , int sourceEnd ) { } public static ExplicitConstructorCall implicitSuperConstructorCall ( ) { } public boolean isSuper ( ) { } public boolean isThis ( ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = NotAConstant ; if ( ! ( checkAccess ( scope . methodScope ( ) ) ) ) return null ; SourceTypeBinding enclosingTb = scope . enclosingSourceType ( ) ; if ( scope . isJavaLangObject ( enclosingTb ) ) { scope . problemReporter ( ) . cannotUseSuperInJavaLangObject ( this ) ; return null ; } <START_BUG> return enclosingTb . superclass ; <END_BUG> } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
return this . expressionType = enclosingTb . superclass ;
Buggy code:
public class ManagementChannel extends ProtocolChannel { private final ManagementChannel . RequestReceiver requestReceiver = new ManagementChannel . RequestReceiver ( ) ; private final ManagementChannel . ResponseReceiver responseReceiver = new ManagementChannel . ResponseReceiver ( ) ; ManagementChannel ( String name , Channel channel ) { } public void setOperationHandler ( final ManagementOperationHandler handler ) { } @ Override protected void doHandle ( final Channel channel , final MessageInputStream message ) { } void executeRequest ( ManagementRequest < ? > request , ManagementResponseHandler < ? > responseHandler ) throws IOException { } void throwFormattedException ( Exception e ) throws IOException { } private class RequestReceiver { private volatile ManagementOperationHandler operationHandler ; private void handleRequest ( final ManagementRequestHeader header , final DataInput input ) throws IOException { <START_BUG> log . tracef ( "%s<seq2seq4repair_space>handling<seq2seq4repair_space>request<seq2seq4repair_space>%d" , ManagementChannel . this , header . getBatchId ( ) ) ; <END_BUG> final FlushableDataOutputImpl output = FlushableDataOutputImpl . create ( writeMessage ( ) ) ; Exception error = null ; try { final ManagementRequestHandler requestHandler ; try { requestHandler = getRequestHandler ( header ) ; requestHandler . setContext ( new ManagementRequestContext ( ManagementChannel . this , header ) ) ; requestHandler . readRequest ( input ) ; expectHeader ( input , REQUEST_END ) ; } catch ( Exception e ) { error = e ; throw e ; } finally { writeResponseHeader ( header , output , error ) ; if ( error != null ) { output . writeByte ( RESPONSE_END ) ; } } requestHandler . writeResponse ( output ) ; output . writeByte ( RESPONSE_END ) ; } catch ( Exception e ) { throwFormattedException ( e ) ; } finally { log . tracef ( "%s<seq2seq4repair_space>finished<seq2seq4repair_space>request<seq2seq4repair_space>%d" , ManagementChannel . this , header . getBatchId ( ) ) ; IoUtils . safeClose ( output ) ; } } private ManagementRequestHandler getRequestHandler ( final ManagementRequestHeader header ) throws IOException { } private void writeResponseHeader ( final ManagementRequestHeader header , DataOutput output , Exception exception ) throws IOException { } private void setOperationHandler ( final ManagementOperationHandler operationHandler ) { } private String formatException ( Exception exception ) { } } private class ResponseReceiver { private final Map < Integer , ManagementResponseHandler < ? > > responseHandlers = Collections . synchronizedMap ( new HashMap < Integer , ManagementResponseHandler < ? > > ( ) ) ; private void registerResponseHandler ( final int requestId , final ManagementResponseHandler < ? > handler ) throws IOException { } private void handleResponse ( ManagementResponseHeader header , DataInput input ) throws IOException { } } }

Fix:
log . tracef ( "%s<seq2seq4repair_space>handling<seq2seq4repair_space>request<seq2seq4repair_space>%d(%d)" , ManagementChannel . this , header . getBatchId ( ) , header . getRequestId ( ) ) ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public class MdAppDesign extends DefaultAppDesign { private static Log log = LogFactory . getLog ( MdAppDesign . class ) ; public static final String FONT_FACE = "Roboto" ; enum FontStyle { Body1 , Body2 , Subhead ; } public static int dp ( int dp ) { } public static Font font ( MdAppDesign . FontStyle style ) { } public int dpi ; public Map < MdAppDesign . FontStyle , Font > fonts = new HashMap ( 32 ) ; @ Override public Shell createMainWindow ( @ SuppressWarnings ( "hiding" ) Display display ) { Shell result = super . createMainWindow ( display ) ; MdAppDesign . log . info ( ( "DPI:<seq2seq4repair_space>" + ( display . getDPI ( ) . x ) ) ) ; String userAgent = RWT . getRequest ( ) . getHeader ( "User-Agent" ) ; MdAppDesign . log . info ( ( "User-Agent:<seq2seq4repair_space>" + userAgent ) ) ; dpi = 96 ; boolean mobile = false ; if ( userAgent . toLowerCase ( ) . contains ( "mobile" ) ) { <START_BUG> dpi = 120 ; <END_BUG> mobile = true ; } ResourceFactory resourceFactory = ContextProvider . getApplicationContext ( ) . getResourceFactory ( ) ; fonts . put ( MdAppDesign . FontStyle . Body1 , ( mobile ? resourceFactory . getFont ( new org . eclipse . swt . graphics . FontData ( MdAppDesign . FONT_FACE , 14 , SWT . NORMAL ) ) : resourceFactory . getFont ( new org . eclipse . swt . graphics . FontData ( MdAppDesign . FONT_FACE , 13 , SWT . NORMAL ) ) ) ) ; fonts . put ( MdAppDesign . FontStyle . Body2 , ( mobile ? resourceFactory . getFont ( new org . eclipse . swt . graphics . FontData ( MdAppDesign . FONT_FACE , 14 , SWT . BOLD ) ) : resourceFactory . getFont ( new org . eclipse . swt . graphics . FontData ( MdAppDesign . FONT_FACE , 13 , SWT . BOLD ) ) ) ) ; fonts . put ( MdAppDesign . FontStyle . Subhead , ( mobile ? resourceFactory . getFont ( new org . eclipse . swt . graphics . FontData ( MdAppDesign . FONT_FACE , 17 , SWT . NORMAL ) ) : resourceFactory . getFont ( new org . eclipse . swt . graphics . FontData ( MdAppDesign . FONT_FACE , 15 , SWT . NORMAL ) ) ) ) ; return result ; } @ Override public IPanelToolkit createToolkit ( PanelPath panelPath ) { } public int _dp ( int dp ) { } }

Fix:
dpi = 110 ;
Buggy code:
public class TypeParameterPattern extends JavaSearchPattern { protected boolean findDeclarations ; protected boolean findReferences ; protected char [ ] name ; protected ITypeParameter typeParameter ; protected char [ ] declaringMemberName ; protected char [ ] methodDeclaringClassName ; protected char [ ] [ ] methodArgumentTypes ; public TypeParameterPattern ( boolean findDeclarations , boolean findReferences , ITypeParameter typeParameter , int matchRule ) { } public void findIndexMatches ( Index index , IndexQueryRequestor requestor , SearchParticipant participant , IJavaSearchScope scope , IProgressMonitor progressMonitor ) { IPackageFragmentRoot root = ( ( IPackageFragmentRoot ) ( this . typeParameter . getAncestor ( IJavaElement . PACKAGE_FRAGMENT_ROOT ) ) ) ; String documentPath ; String relativePath ; if ( root . isArchive ( ) ) { IType type = ( ( IType ) ( this . typeParameter . getAncestor ( IJavaElement . TYPE ) ) ) ; <START_BUG> relativePath = ( type . getFullyQualifiedName ( '//' ) . replace ( '.' , '//' ) ) + ( SuffixConstants . SUFFIX_STRING_class ) ; <END_BUG> documentPath = ( ( root . getPath ( ) ) + ( IJavaSearchScope . JAR_FILE_ENTRY_SEPARATOR ) ) + relativePath ; } else { IPath path = this . typeParameter . getPath ( ) ; documentPath = path . toString ( ) ; relativePath = Util . relativePath ( path , 1 ) ; } if ( scope instanceof JavaSearchScope ) { JavaSearchScope javaSearchScope = ( ( JavaSearchScope ) ( scope ) ) ; AccessRuleSet access = javaSearchScope . getAccessRuleSet ( relativePath , index . containerPath ) ; if ( access != ( JavaSearchScope . NOT_ENCLOSED ) ) { if ( ! ( requestor . acceptIndexMatch ( documentPath , this , participant , access ) ) ) throw new OperationCanceledException ( ) ; } } else if ( scope . encloses ( documentPath ) ) { if ( ! ( requestor . acceptIndexMatch ( documentPath , this , participant , null ) ) ) throw new OperationCanceledException ( ) ; } } protected StringBuffer print ( StringBuffer output ) { } }

Fix:
relativePath = ( type . getFullyQualifiedName ( '$' ) . replace ( '.' , '//' ) ) + ( SuffixConstants . SUFFIX_STRING_class ) ;
Buggy code:
public class SOWrapper { protected ISharedObject sharedObject ; private SOConfig sharedObjectConfig ; ID sharedObjectID ; private SOContainer container ; private ID containerID ; private Thread thread ; SimpleFIFOQueue queue ; protected SOWrapper ( SOContainer . LoadingSharedObject obj , SOContainer cont ) { } public SOWrapper ( SOConfig aConfig , ISharedObject obj , SOContainer cont ) { } protected void init ( ) throws SharedObjectInitException { } protected ID getObjID ( ) { } protected ID getHomeID ( ) { } protected SOConfig getConfig ( ) { } protected void activated ( ) { } protected void deactivated ( ) { } protected void destroyed ( ) { } protected void otherChanged ( ID otherID , boolean activated ) { } protected void memberChanged ( Member m , boolean add ) { } protected Thread getThread ( ) { } private void send ( Event evt ) { } public static class ProcEvent implements Event { private static final long serialVersionUID = 3257002142513378616L ; Event theEvent = null ; public ProcEvent ( Event event ) { } Event getEvent ( ) { } } protected static class DisposeEvent implements Event { private static final long serialVersionUID = 3688503311859135536L ; DisposeEvent ( ) { } } protected void svc ( Event evt ) { } protected void doDestroy ( ) { } protected void deliverSharedObjectMessage ( ID fromID , Serializable data ) { } protected void deliverCreateResponse ( ID fromID , ContainerMessage . CreateResponseMessage resp ) { } public void deliverEvent ( Event evt ) { } protected void destroySelf ( ) { } public String toString ( ) { } protected void debug ( String msg ) { <START_BUG> Trace . trace ( PLUGIN_ID , DEBUG , ( ( msg + ":" ) + ( container . getID ( ) ) ) ) ; <END_BUG> } protected void traceStack ( String msg , Throwable e ) { } protected void handleRuntimeException ( Throwable except ) { } protected ISharedObject getSharedObject ( ) { } public SimpleFIFOQueue getQueue ( ) { } }

Fix:
Trace . trace ( PLUGIN_ID , DEBUG , ( ( ( ( ( "SOWrapper:oID=" + ( sharedObjectID ) ) + ":" ) + msg ) + ":cID=" ) + ( container . getID ( ) ) ) ) ;
Buggy code:
public class NoteListActivity extends ListActivity { private static final int ACTIVITY_CREATE = 0 ; private static final int ACTIVITY_EDIT = 1 ; private static final int DELETE_ID = Menu . FIRST ; public static final NoteDataController controller = new NoteDataController ( ) ; public NoteListAdapter adapter ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onCreateContextMenu ( ContextMenu menu , View v , ContextMenuInfo menuInfo ) { } @ Override public boolean onContextItemSelected ( MenuItem item ) { } private void createNote ( ) { } @ Override protected void onListItemClick ( ListView l , View v , int position , long id ) { super . onListItemClick ( l , v , position , id ) ; Intent i = new Intent ( this , NoteEditActivity . class ) ; i . putExtra ( KEY_NOTEEXISTS , true ) ; <START_BUG> i . putExtra ( KEY_NOTEID , l . getAdapter ( ) . getItemId ( ( ( ( int ) ( id ) ) - 1 ) ) ) ; <END_BUG> startActivityForResult ( i , NoteListActivity . ACTIVITY_EDIT ) ; } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent intent ) { } }

Fix:
i . putExtra ( KEY_NOTEID , l . getAdapter ( ) . getItemId ( position ) ) ;
Buggy code:
public class ProjectsListApiServlet extends AbstractApiServlet { private static final Logger log = Logger . getLogger ( ProjectsListApiServlet . class ) ; private static final long serialVersionUID = 1L ; @ Inject private ConfigurationManagerServer configurationManager ; @ Inject private UserPermissionsGetter permissionsManager ; @ Inject private NodeAggregator aggregator ; @ Inject private AfterProjectModifyPlugin afterProjectModifyPlugin ; @ Override protected void myGet ( HttpServletRequest request , HttpServletResponse response ) { String query = getParameter ( request , "projectSearch" ) ; List < ProjectJson > configuredProjects = filter ( configurationManager . getConfiguredProjects ( ) , query ) ; Comparator < ProjectJson > c = new Comparator < ProjectJson > ( ) { @ Override public int compare ( ProjectJson o1 , ProjectJson o2 ) { return o1 . name ( ) . compareTo ( o2 . name ( ) ) ; } } ; Collections . sort ( configuredProjects , c ) ; List < CodeineProject > projects = Lists . newArrayList ( ) ; for ( ProjectJson projectJson : configuredProjects ) { if ( permissionsManager . user ( request ) . canRead ( projectJson . name ( ) ) ) { try { VersionItemInfo versionItem = aggregator . aggregate ( projectJson . name ( ) ) . get ( ALL_VERSION ) ; <START_BUG> projects . add ( new CodeineProject ( projectJson . name ( ) , versionItem . count ( ) ) ) ; <END_BUG> } catch ( Exception e ) { ProjectsListApiServlet . log . error ( ( "failed<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>project<seq2seq4repair_space>" + ( projectJson . name ( ) ) ) , e ) ; } } } writeResponseJson ( response , projects ) ; } @ Override protected void myPost ( HttpServletRequest request , HttpServletResponse response ) { } private List < ProjectJson > filter ( List < ProjectJson > configuredProjects , final String query ) { } @ Override protected boolean checkPermissions ( HttpServletRequest request ) { } }

Fix:
projects . add ( new CodeineProject ( projectJson . name ( ) , versionItem . count ( ) , projectJson . description ( ) ) ) ;
Buggy code:
public class TransactionExecutor { private static final Logger logger = Logger . getLogger ( TransactionExecutor . class ) ; private String dsName ; private int level ; public TransactionExecutor ( String dsName , int level ) { } public void transaction ( TransactionAspect aspect , InvocationHandler ih , Object proxy , Method method , Object [ ] args ) { DataSourceMeta dataSourceMeta = Metadatas . getDataSourceMeta ( dsName ) ; Connection conn = dataSourceMeta . getCurrentConnection ( ) ; if ( conn != null ) { try { if ( ( conn . getTransactionIsolation ( ) ) < ( level ) ) { conn . setTransactionIsolation ( level ) ; } return ; } catch ( SQLException e ) { throw new TransactionException ( e . getMessage ( ) , e ) ; } } Boolean autoCommit = null ; try { conn = dataSourceMeta . getConnection ( ) ; autoCommit = conn . getAutoCommit ( ) ; dataSourceMeta . setCurrentConnection ( conn ) ; conn . setTransactionIsolation ( level ) ; conn . setAutoCommit ( false ) ; aspect . aspect ( ih , proxy , method , args ) ; conn . commit ( ) ; } catch ( Throwable t ) { if ( conn != null ) try { conn . rollback ( ) ; } catch ( SQLException e ) { TransactionExecutor . logger . error ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>rollback<seq2seq4repair_space>" + ( dsName ) ) + "<seq2seq4repair_space>connection." ) , e ) ; } <START_BUG> throw new TransactionException ( t . getMessage ( ) , t ) ; <END_BUG> } finally { try { if ( conn != null ) { if ( autoCommit != null ) conn . setAutoCommit ( autoCommit ) ; conn . close ( ) ; } } catch ( Throwable t ) { TransactionExecutor . logger . error ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>close<seq2seq4repair_space>" + ( dsName ) ) + "<seq2seq4repair_space>connection." ) , t ) ; } finally { dataSourceMeta . rmCurrentConnection ( ) ; } } } }

Fix:
throw new TransactionException ( t . getMessage ( ) , t . getCause ( ) ) ;
Buggy code:
class WebDeploymentActivator { static void activate ( final String defaultHost , final SharedWebMetaDataBuilder sharedWebBuilder , final SharedTldsMetaDataBuilder sharedTldsBuilder , final BootUpdateContext updateContext ) { updateContext . addDeploymentProcessor ( STRUCTURE , STRUCTURE_WAR_DEPLOYMENT_INIT , new WarDeploymentInitializingProcessor ( ) ) ; <START_BUG> updateContext . addDeploymentProcessor ( STRUCTURE , STRUCTURE_WAR_DEPLOYMENT , new org . jboss . as . web . deployment . WarStructureDeploymentProcessor ( sharedWebBuilder . create ( ) , sharedTldsBuilder . create ( ) ) ) ; <END_BUG> updateContext . addDeploymentProcessor ( PARSE , PARSE_WEB_DEPLOYMENT , new WebParsingDeploymentProcessor ( ) ) ; updateContext . addDeploymentProcessor ( PARSE , PARSE_WEB_DEPLOYMENT_FRAGMENT , new WebFragmentParsingDeploymentProcessor ( ) ) ; updateContext . addDeploymentProcessor ( PARSE , PARSE_JBOSS_WEB_DEPLOYMENT , new JBossWebParsingDeploymentProcessor ( ) ) ; updateContext . addDeploymentProcessor ( PARSE , PARSE_TLD_DEPLOYMENT , new TldParsingDeploymentProcessor ( ) ) ; updateContext . addDeploymentProcessor ( DEPENDENCIES , DEPENDENCIES_WAR_MODULE , new WarClassloadingDependencyProcessor ( ) ) ; updateContext . addDeploymentProcessor ( POST_MODULE , POST_MODULE_ANNOTATION_WAR , new WarAnnotationDeploymentProcessor ( ) ) ; updateContext . addDeploymentProcessor ( INSTALL , INSTALL_SERVLET_INIT_DEPLOYMENT , new ServletContainerInitializerDeploymentProcessor ( ) ) ; updateContext . addDeploymentProcessor ( INSTALL , INSTALL_WAR_METADATA , new WarMetaDataProcessor ( ) ) ; updateContext . addDeploymentProcessor ( INSTALL , INSTALL_WAR_DEPLOYMENT , new WarDeploymentProcessor ( defaultHost ) ) ; } }

Fix:
updateContext . addDeploymentProcessor ( STRUCTURE , STRUCTURE_WAR , new org . jboss . as . web . deployment . WarStructureDeploymentProcessor ( sharedWebBuilder . create ( ) , sharedTldsBuilder . create ( ) ) ) ;
Buggy code:
public class HeapSortTest { @ Test public void testHeapSort ( ) { Integer [ ] data = new Integer [ ] { 3 , 2 , 1 , 4 , 5 , 9 , 6 , 7 , 8 , 0 } ; HeapSort < Integer > heapSort = new HeapSort < Integer > ( ) ; heapSort . setArray ( data ) ; heapSort . sort ( ) ; for ( Integer integer : data ) { System . out . print ( ( integer + "<seq2seq4repair_space>" ) ) ; } for ( int i = 0 ; i < ( data . length ) ; i ++ ) { <START_BUG> assertEquals ( data [ i ] . intValue ( ) , i ) ; <END_BUG> } } }

Fix:
assertEquals ( i , data [ i ] . intValue ( ) ) ;
Buggy code:
public class DNSSEC { private DNSSEC ( ) { } public static final byte RSAMD5 = 1 ; public static final byte RSA = DNSSEC . RSAMD5 ; public static final byte DH = 2 ; public static final byte DSA = 3 ; public static final byte RSASHA1 = 5 ; public static final byte Failed = - 1 ; public static final byte Insecure = 0 ; public static final byte Secure = 1 ; private static void digestSIG ( DataByteOutputStream out , SIGRecord sig ) { out . writeShort ( sig . getTypeCovered ( ) ) ; out . writeByte ( sig . getAlgorithm ( ) ) ; out . writeByte ( sig . getLabels ( ) ) ; <START_BUG> out . writeInt ( sig . getOrigTTL ( ) ) ; <END_BUG> out . writeInt ( ( ( int ) ( ( sig . getExpire ( ) . getTime ( ) ) // 1000 ) ) ) ; out . writeInt ( ( ( int ) ( ( sig . getTimeSigned ( ) . getTime ( ) ) // 1000 ) ) ) ; out . writeShort ( sig . getFootprint ( ) ) ; sig . getSigner ( ) . toWireCanonical ( out ) ; } public static byte [ ] digestRRset ( SIGRecord sig , RRset rrset ) { } public static byte [ ] digestMessage ( SIGRecord sig , Message msg , byte [ ] previous ) { } }

Fix:
out . writeUnsignedInt ( sig . getOrigTTL ( ) ) ;
Buggy code:
public class DateSlider extends DialogFragment { private static String TAG = "DateSlider" ; protected DateSlider . OnDateSetListener onDateSetListener ; protected long mInitialTime ; protected int mLayoutID ; protected TimeBoundaries tempTimeBoundaries = new TimeBoundaries ( ) ; protected TextView mTitleText ; protected Button dateSliderOkButton ; protected Button dateSliderCancelButton ; protected Button dateSliderClearButton ; protected SliderContainer mContainer ; protected Button jumpDecYearButton ; protected Button jumpDecMonthButton ; protected Button jumpDecWeekButton ; protected Button jumpDecDayButton ; protected Button jumpIncDayButton ; protected Button jumpIncWeekButton ; protected Button jumpIncMonthButton ; protected Button jumpIncYearButton ; private String title ; private boolean performAnimation = true ; private AnimatorSet animators ; public DateSlider ( ) { } public DateSlider setLayout ( int layoutID ) { } public DateSlider setOnDateSetListener ( DateSlider . OnDateSetListener onDateSetListener ) { } public DateSlider setMinTime ( long minTime ) { } public DateSlider setMaxTime ( long maxTime ) { } public DateSlider setMinuteInterval ( int minuteInterval ) { } public DateSlider setInitialTime ( long initialTime ) { } public DateSlider setHours ( int startHour , int endHour ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onStart ( ) { } protected void disableAnimationAfterFirstStart ( ) { } protected void doAnimationForJumpButtons ( HorizontalScrollView jumpButtonsScrollView , int max , int position ) { } public void setPerformAnimation ( boolean performAnimation ) { } protected void setTime ( Calendar c ) { } private OnTimeChangeListener onTimeChangeListener = new OnTimeChangeListener ( ) { public void onTimeChange ( Calendar time ) { } } ; @ Override public void onSaveInstanceState ( Bundle outState ) { if ( outState == null ) outState = new Bundle ( ) ; <START_BUG> outState . putSerializable ( "time" , getTime ( ) . getTimeInMillis ( ) ) ; <END_BUG> outState . putSerializable ( "tempTimeBoundaries" , tempTimeBoundaries ) ; outState . putString ( "title" , title ) ; outState . putInt ( "layout" , mLayoutID ) ; outState . putBoolean ( "performAnimation" , performAnimation ) ; } protected Calendar getTime ( ) { } public DateSlider setTitle ( String title ) { } protected void setTitle ( Calendar time ) { } public interface OnDateSetListener { public void onDateSet ( DateSlider view , Calendar selectedDate ) { } } }

Fix:
outState . putLong ( "time" , getTime ( ) . getTimeInMillis ( ) ) ;
Buggy code:
public class DBCursorPoolEntryKey { private final DBCollection collection ; private final Deque < String > sort ; private final Deque < String > filter ; private final int skipped ; private final long cursorId ; public DBCursorPoolEntryKey ( DBCollection collection , Deque < String > sort , Deque < String > filter , int skipped , long cursorId ) { } public DBCollection getCollection ( ) { } public Deque < String > getFilter ( ) { } public Deque < String > getSort ( ) { } public int getSkipped ( ) { } public long getCursorId ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( ( ( ( ( ( ( ( ( "{<seq2seq4repair_space>collection:<seq2seq4repair_space>" + ( collection . getName ( ) ) ) + ",<seq2seq4repair_space>" ) + "filter:<seq2seq4repair_space>" ) + ( ( filter ) == null ? "null" : filter . toString ( ) ) ) + ",<seq2seq4repair_space>" ) + "sort:<seq2seq4repair_space>" ) + ( ( sort ) == null ? "null" : sort . toString ( ) ) ) + ",<seq2seq4repair_space>" ) + "skipped:<seq2seq4repair_space>" ) + ( skipped ) ) + ",<seq2seq4repair_space>" ) + "cursorId:<seq2seq4repair_space>" ) + ( cursorId ) ) + "}" ; <END_BUG> } String getCacheStatsGroup ( ) { } No newline ; at end ; of file ; }

Fix:
return ( ( ( ( ( ( ( ( ( ( ( ( ( "{<seq2seq4repair_space>collection:<seq2seq4repair_space>" + ( collection . getFullName ( ) ) ) + ",<seq2seq4repair_space>" ) + "filter:<seq2seq4repair_space>" ) + ( ( filter ) == null ? "null" : filter . toString ( ) ) ) + ",<seq2seq4repair_space>" ) + "sort:<seq2seq4repair_space>" ) + ( ( sort ) == null ? "null" : sort . toString ( ) ) ) + ",<seq2seq4repair_space>" ) + "skipped:<seq2seq4repair_space>" ) + ( skipped ) ) + ",<seq2seq4repair_space>" ) + "cursorId:<seq2seq4repair_space>" ) + ( cursorId ) ) + "}" ;
Buggy code:
public class TestEmptyTokenStream extends BaseTokenStreamTestCase { public void testConsume ( ) throws IOException { } public void testConsume2 ( ) throws IOException { } public void testIndexWriter_LUCENE4656 ( ) throws IOException { Directory directory = newDirectory ( ) ; IndexWriter writer = new IndexWriter ( directory , newIndexWriterConfig ( TEST_VERSION_CURRENT , null ) ) ; TokenStream ts = new EmptyTokenStream ( ) ; assertFalse ( ts . hasAttribute ( TermToBytesRefAttribute . class ) ) ; Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . StringField ( "id" , "0" , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "description" , ts ) ) ; writer . addDocument ( doc ) ; assertEquals ( 1 , writer . numDocs ( ) ) ; <START_BUG> writer . close ( ) ; <END_BUG> directory . close ( ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public abstract class ReleaseAction implements Action { private final transient AbstractProject project ; protected ReleaseAction . VERSIONING versioning ; protected String releaseVersion ; protected String nextVersion ; Boolean pro ; boolean createVcsTag ; String tagUrl ; String tagComment ; String nextDevelCommitComment ; String stagingRepositoryKey ; String stagingComment ; boolean createReleaseBranch ; String releaseBranch ; public enum VERSIONING { GLOBAL , PER_MODULE , NONE ; } public ReleaseAction ( AbstractProject project ) { } public String getIconFileName ( ) { } public String getDisplayName ( ) { } public String getUrlName ( ) { } public ReleaseAction . VERSIONING getVersioning ( ) { } public String getReleaseVersion ( ) { } public String getNextVersion ( ) { } public boolean isCreateVcsTag ( ) { } public String getTagUrl ( ) { } public String getTagComment ( ) { } public String getNextDevelCommitComment ( ) { } public boolean isCreateReleaseBranch ( ) { } public String getReleaseBranch ( ) { } public String getStagingComment ( ) { } public String getStagingRepositoryKey ( ) { } public String latestVersioningSelection ( ) { } public boolean isArtifactoryPro ( ) { } protected String getBaseTagUrlAccordingToScm ( String baseTagUrl ) { } public abstract String getDefaultTagUrl ( ) { } public abstract String getDefaultReleaseBranch ( ) { } public String getDefaultReleaseComment ( ) { } public String getDefaultNextDevelCommitMessage ( ) { } public boolean isGit ( ) { } public abstract String getDefaultStagingRepository ( ) { } public String calculateReleaseVersion ( ) { } public abstract String getCurrentVersion ( ) { } public String calculateReleaseVersion ( String fromVersion ) { String releaseVersion ; try { <START_BUG> releaseVersion = new GenericArtifactVersion ( fromVersion ) . upgradeLeastSignificantNumber ( ) . setBuildSpecifier ( "SNAPSHOT" ) . toString ( ) ; <END_BUG> } catch ( IllegalArgumentException e ) { releaseVersion = fromVersion ; } return releaseVersion ; } @ SuppressWarnings ( { "UnusedDeclaration" } ) public String calculateNextVersion ( ) { } public String calculateNextVersion ( String fromVersion ) { } @ SuppressWarnings ( { "UnusedDeclaration" } ) public abstract List < String > getRepositoryKeys ( ) { } public abstract ArtifactoryServer getArtifactoryServer ( ) { } public abstract String lastStagingRepository ( ) { } @ SuppressWarnings ( { "UnusedDeclaration" } ) public void doSubmit ( StaplerRequest req , StaplerResponse resp ) throws IOException , ServletException { } protected abstract void doPerModuleVersioning ( StaplerRequest req ) { } protected void doGlobalVersioning ( StaplerRequest req ) { } public abstract String getReleaseVersionFor ( Object moduleName ) { } public abstract String getNextVersionFor ( Object moduleName ) { } }

Fix:
releaseVersion = new GenericArtifactVersion ( fromVersion ) . setBuildSpecifier ( null ) . toString ( ) ;
Buggy code:
public class NavigatorLabel extends Label { private static final long serialVersionUID = 1L ; private static interface PageableComponent extends IClusterable { int getRowCount ( ) { } int getCurrentPage ( ) { } int getRowsPerPage ( ) { } } public NavigatorLabel ( final String id , final DataTable table ) { } public NavigatorLabel ( final String id , final DataView table ) { } private NavigatorLabel ( final String id , final NavigatorLabel . PageableComponent table ) { } private class LabelModelObject implements IClusterable { private static final long serialVersionUID = 1L ; private NavigatorLabel . PageableComponent table ; public LabelModelObject ( NavigatorLabel . PageableComponent table ) { } public int getOf ( ) { } public int getFrom ( ) { } public int getTo ( ) { if ( ( getOf ( ) ) == 0 ) { return 0 ; } <START_BUG> return Math . min ( getOf ( ) , ( ( getFrom ( ) ) + ( table . getRowsPerPage ( ) ) ) ) ; <END_BUG> } } }

Fix:
return Math . min ( getOf ( ) , ( ( ( getFrom ( ) ) + ( table . getRowsPerPage ( ) ) ) - 1 ) ) ;
Buggy code:
public class HeaderSectionMyLabel extends WebMarkupContainer { private static final long serialVersionUID = 1L ; public HeaderSectionMyLabel ( final String id , final String label ) { } @ Override public void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } @ Override protected IMarkupSourcingStrategy newMarkupSourcingStrategy ( ) { <START_BUG> return new PanelMarkupSourcingStrategy ( ) { <END_BUG> @ Override public IMarkupFragment getMarkup ( final MarkupContainer parent , final Component child ) { MarkupStream markup = new MarkupStream ( parent . getAssociatedMarkup ( ) ) ; markup . skipRawMarkup ( ) ; return markup . getMarkupFragment ( ) ; } @ Override public void onComponentTagBody ( Component component , MarkupStream markupStream , ComponentTag openTag ) { HeaderSectionMyLabel . this . onComponentTagBody ( markupStream , openTag ) ; } } ; } }

Fix:
return new PanelMarkupSourcingStrategy ( false ) {
Buggy code:
public class Composite extends Scrollable { Layout layout ; Control [ ] tabList ; int cornerHandle ; int layoutCount = 0 ; Composite ( ) { } public Composite ( Composite parent , int style ) { } Control [ ] _getChildren ( ) { } Control [ ] _getTabList ( ) { } public void changed ( Control [ ] changed ) { } protected void checkSubclass ( ) { } Control [ ] computeTabList ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( int index ) { } void createScrollBars ( ) { } byte [ ] defaultFont ( ) { } void createScrolledHandle ( int parentHandle ) { } void drawWidget ( int widget , int damage ) { } Composite findDeferredControl ( ) { } void fixTabList ( Control control ) { } public boolean forceFocus ( ) { } public Rectangle getClientArea ( ) { } int getClipping ( int widget , int topWidget , boolean clipChildren , boolean clipSiblings ) { } public Control [ ] getChildren ( ) { } int getChildrenCount ( ) { } public Layout getLayout ( ) { } public boolean getLayoutDeferred ( ) { } boolean hasBorder ( ) { } boolean hasFocus ( ) { } boolean hooksKeys ( ) { } public boolean isLayoutDeferred ( ) { } public Control [ ] getTabList ( ) { } public void layout ( ) { } public void layout ( boolean changed ) { } public void layout ( boolean changed , boolean all ) { } public void layout ( Control [ ] changed ) { } void markLayout ( boolean changed , boolean all ) { } Point minimumSize ( ) { } void moveToBack ( int child ) { } int parentingHandle ( ) { } int Ph_EV_BUT_PRESS ( int widget , int info ) { } int Pt_CB_OUTBOUND ( int widget , int info ) { } void releaseChildren ( boolean destroy ) { Control [ ] children = _getChildren ( ) ; for ( int i = 0 ; i < ( children . length ) ; i ++ ) { Control child = children [ i ] ; if ( ( child != null ) && ( ! ( child . isDisposed ( ) ) ) ) { <START_BUG> child . releaseChildren ( false ) ; <END_BUG> } } super . releaseChildren ( destroy ) ; } void releaseHandle ( ) { } void releaseWidget ( ) { } void removeControl ( Control control ) { } void resizeClientArea ( ) { } void resizeClientArea ( int width , int height , boolean events ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public boolean setFocus ( ) { } public void setLayout ( Layout layout ) { } public void setLayoutDeferred ( boolean defer ) { } boolean setTabGroupFocus ( ) { } public void setTabList ( Control [ ] tabList ) { } int traversalCode ( int key_sym , PhKeyEvent_t ke ) { } void updateLayout ( boolean all ) { } int widgetClass ( ) { } }

Fix:
child . release ( false ) ;
Buggy code:
public class ValidatorStringResourceLoader implements IStringResourceLoader { private static final Logger log = LoggerFactory . getLogger ( ValidatorStringResourceLoader . class ) ; public ValidatorStringResourceLoader ( ) { } public String loadStringResource ( Class < ? > clazz , final String key , final Locale locale , final String style , final String variation ) { if ( ( clazz == null ) || ( ! ( IValidator . class . isAssignableFrom ( clazz ) ) ) ) { return null ; } IPropertiesFactory propertiesFactory = Application . get ( ) . getResourceSettings ( ) . getPropertiesFactory ( ) ; while ( true ) { String path = clazz . getName ( ) . replace ( '.' , '//' ) ; <START_BUG> ResourceNameIterator iter = new ResourceNameIterator ( path , style , variation , locale , null ) ; <END_BUG> while ( iter . hasNext ( ) ) { String newPath = iter . next ( ) ; final Properties props = propertiesFactory . load ( clazz , newPath ) ; if ( props != null ) { String value = props . getString ( key ) ; if ( value != null ) { if ( ValidatorStringResourceLoader . log . isDebugEnabled ( ) ) { ValidatorStringResourceLoader . log . debug ( ( ( ( "Found<seq2seq4repair_space>resource<seq2seq4repair_space>from:<seq2seq4repair_space>" + props ) + ";<seq2seq4repair_space>key:<seq2seq4repair_space>" ) + key ) ) ; } return value ; } } } clazz = clazz . getSuperclass ( ) ; if ( ( clazz == null ) || ( Object . class . equals ( clazz ) ) ) { break ; } } return null ; } public String loadStringResource ( final Component component , final String key ) { } }

Fix:
ResourceNameIterator iter = new ResourceNameIterator ( path , style , variation , locale , null , false ) ;
Buggy code:
public class DockerImage implements Image { private static final Logger LOG = LoggerFactory . getLogger ( DockerImage . class ) ; private final DockerConnector docker ; private final DockerImageKey key ; private final LineConsumer outputConsumer ; private final String registry ; private final DockerNodeFactory dockerNodeFactory ; DockerImage ( DockerConnector docker , String registry , DockerNodeFactory dockerNodeFactory , DockerImageKey key , LineConsumer outputConsumer ) { } @ Override public ImageMetadata getMetadata ( ) throws MachineException { } @ Override public Instance createInstance ( ) throws MachineException { try { final ContainerConfig config = new ContainerConfig ( ) . withImage ( key . getImageId ( ) ) . withMemorySwap ( ( - 1 ) ) . withExposedPorts ( Collections . singletonMap ( "4300" , Collections . < String , String > emptyMap ( ) ) ) ; DockerImage . LOG . debug ( "Creating<seq2seq4repair_space>container<seq2seq4repair_space>from<seq2seq4repair_space>image<seq2seq4repair_space>{}" , key . getImageId ( ) ) ; final String containerId = docker . createContainer ( config , null ) . getId ( ) ; DockerImage . LOG . debug ( "Container<seq2seq4repair_space>{}<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>created<seq2seq4repair_space>successfully" , containerId ) ; final DockerNode node = dockerNodeFactory . createNode ( containerId ) ; String hostProjectsFolder = node . getProjectsFolder ( ) ; DockerImage . LOG . debug ( "Starting<seq2seq4repair_space>container<seq2seq4repair_space>{}" , containerId ) ; <START_BUG> docker . startContainer ( containerId , new HostConfig ( ) . withPublishAllPorts ( true ) . withBinds ( String . format ( "%s:%s" , hostProjectsFolder , "//projects" ) , "//usr//local//codenvy//terminal://usr//local//codenvy//terminal:ro" ) , new LogMessagePrinter ( outputConsumer ) ) ; <END_BUG> DockerImage . LOG . debug ( "Container<seq2seq4repair_space>{}<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>started<seq2seq4repair_space>successfully" , containerId ) ; startTerminal ( containerId ) ; return new DockerInstance ( docker , registry , containerId , outputConsumer , node ) ; } catch ( IOException e ) { throw new MachineException ( e ) ; } } private void startTerminal ( final String container ) { } }

Fix:
docker . startContainer ( containerId , new HostConfig ( ) . withPublishAllPorts ( true ) . withBinds ( String . format ( "%s:%s" , hostProjectsFolder , "//projects" ) , "//usr//local//codenvy//terminal://usr//local//codenvy//terminal" ) , new LogMessagePrinter ( outputConsumer ) ) ;
Buggy code:
public class SimpleGetCommand extends AbstractGetCommand { private static final Log log = LogFactory . getLog ( SimpleGetCommand . class ) ; private boolean printResponse = false ; public SimpleGetCommand ( List < String > urls , int iterations ) { } public SimpleGetCommand ( String url , int iterations ) { } public boolean getPrintResponse ( ) { } public void setPrintResponse ( boolean printResponse ) { } @ Override protected void doGet ( HttpClient client , String url ) throws Exception { GetMethod method = new GetMethod ( url ) ; method . setFollowRedirects ( true ) ; try { int code = client . executeMethod ( method ) ; if ( code != 200 ) { SimpleGetCommand . log . error ( ( "ERROR!<seq2seq4repair_space>code:<seq2seq4repair_space>" + code ) ) ; SimpleGetCommand . log . error ( Streams . readString ( method . getResponseBodyAsStream ( ) ) ) ; } if ( getPrintResponse ( ) ) { <START_BUG> SimpleGetCommand . log . info ( ( "\n" + ( new String ( method . getResponseBody ( ) ) ) ) ) ; <END_BUG> } } finally { method . releaseConnection ( ) ; } } }

Fix:
SimpleGetCommand . log . info ( ( "\n" + ( Streams . readString ( method . getResponseBodyAsStream ( ) ) ) ) ) ;
Buggy code:
public class Communicator { public Communicator ( ) { } public void speak ( int word ) { lock . acquire ( ) ; Lib . debug ( Communicator . dbgCom , "Adding<seq2seq4repair_space>speaker" ) ; speakerQueue . addLast ( KThread . currentThread ( ) ) ; Lib . debug ( Communicator . dbgCom , "Speaker<seq2seq4repair_space>adding<seq2seq4repair_space>word" ) ; wordObj . addLast ( word ) ; if ( ( listenerQueue . size ( ) ) == 0 ) { Lib . debug ( Communicator . dbgCom , "speakerLock<seq2seq4repair_space>sleeping" ) ; speakerLock . sleep ( ) ; } else { <START_BUG> Lib . debug ( Communicator . dbgCom , "SpeakerLock<seq2seq4repair_space>waking" ) ; <END_BUG> listenerLock . wake ( ) ; } listenerLock . wakeAll ( ) ; lock . release ( ) ; return ; } public int listen ( ) { } private static final char dbgCom = 'c' ; private Lock lock ; private Condition2 speakerLock ; private Condition2 listenerLock ; private int listener ; private int speaker ; private LinkedList < Integer > wordObj ; private LinkedList < KThread > listenerQueue ; private LinkedList < KThread > speakerQueue ; private static class CommunicatorSendTest implements Runnable { private String name ; private Communicator communicator ; private int word ; CommunicatorSendTest ( String name , Communicator communicator , int word ) { } public void run ( ) { } } private static class CommunicatorListenTest implements Runnable { private String name ; private Communicator communicator ; CommunicatorListenTest ( String name , Communicator communicator ) { } public void run ( ) { } } public static void selfTest ( ) { } }

Fix:
Lib . debug ( Communicator . dbgCom , "ListenerLock<seq2seq4repair_space>waking" ) ;
Buggy code:
public class GrizzlyHttpServer { public static void main ( String [ ] args ) throws Exception { URI baseUri = UriBuilder . fromUri ( "http:////localhost//" ) . port ( 8000 ) . build ( ) ; ResourceConfig config = new ResourceConfig ( StudentsDataResource . class , SubjectsDataResource . class ) ; <START_BUG> config . register ( DateParamConverterProvider . class ) ; <END_BUG> config . packages ( "org.glassfish.jersey.examples.linking" , "com.fasterxml.jackson.jaxrs" ) . register ( DeclarativeLinkingFeature . class ) ; GrizzlyHttpServerFactory . createHttpServer ( baseUri , config ) ; } }

Fix:
config . register ( new DateParamConverterProvider ( "yyyy-MM-dd" ) ) ;
Buggy code:
public class Delete extends MatchingTask { protected File file = null ; protected File dir = null ; protected Vector filesets = new Vector ( ) ; protected boolean usedMatchingTask = false ; protected boolean includeEmpty = false ; private int verbosity = Project . MSG_VERBOSE ; private boolean quiet = false ; public void setFile ( File file ) { } public void setDir ( File dir ) { } public void setVerbose ( boolean verbose ) { } public void setQuiet ( boolean quiet ) { } public void setIncludeEmptyDirs ( boolean includeEmpty ) { } public void addFileset ( FileSet set ) { } public NameEntry createInclude ( ) { } public NameEntry createExclude ( ) { } public PatternSet createPatternSet ( ) { } public void setIncludes ( String includes ) { } public void setExcludes ( String excludes ) { } public void setDefaultexcludes ( boolean useDefaultExcludes ) { } public void setIncludesfile ( File includesfile ) { } public void setExcludesfile ( File excludesfile ) { } public void execute ( ) throws BuildException { } protected void removeDir ( File d ) { } protected void removeFiles ( File d , String [ ] files , String [ ] dirs ) { if ( ( files . length ) > 0 ) { log ( ( ( ( "Deleting<seq2seq4repair_space>" + ( files . length ) ) + "<seq2seq4repair_space>files<seq2seq4repair_space>from<seq2seq4repair_space>" ) + ( d . getAbsolutePath ( ) ) ) ) ; for ( int j = 0 ; j < ( files . length ) ; j ++ ) { File f = new File ( d , files [ j ] ) ; log ( ( "Deleting<seq2seq4repair_space>" + ( f . getAbsolutePath ( ) ) ) , verbosity ) ; if ( ( ! ( f . delete ( ) ) ) && ( ! ( quiet ) ) ) { throw new BuildException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>file<seq2seq4repair_space>" + ( f . getAbsolutePath ( ) ) ) ) ; } } } if ( ( ( dirs . length ) > 0 ) && ( includeEmpty ) ) { int dirCount = 0 ; <START_BUG> for ( int j = 0 ; j < ( dirs . length ) ; j ++ ) { <END_BUG> File dir = new File ( d , dirs [ j ] ) ; String [ ] dirFiles = dir . list ( ) ; if ( ( dirFiles == null ) || ( ( dirFiles . length ) == 0 ) ) { log ( ( "Deleting<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) , verbosity ) ; if ( ( ! ( dir . delete ( ) ) ) && ( ! ( quiet ) ) ) { throw new BuildException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>delete<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } else { dirCount ++ ; } } } if ( dirCount > 0 ) { log ( ( ( ( ( ( "Deleted<seq2seq4repair_space>" + dirCount ) + "<seq2seq4repair_space>director" ) + ( dirCount == 1 ? "y" : "ies" ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + ( d . getAbsolutePath ( ) ) ) ) ; } } } }

Fix:
for ( int j = ( dirs . length ) - 1 ; j >= 0 ; j -- ) {
Buggy code:
public class ReportHelp implements Command { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; public static final String HELP = "help" ; private static final Set commands = new HashSet ( ) ; public static final String HELP_DOCS = ( "file://////" + ( JMeterUtils . getJMeterHome ( ) ) ) + "//printable_docs//usermanual//" ; public static final String HELP_PAGE = ( ReportHelp . HELP_DOCS ) + "component_reference.html" ; public static final String HELP_FUNCTIONS = ( ReportHelp . HELP_DOCS ) + "functions.html" ; private static JDialog helpWindow ; private static HtmlPane helpDoc ; private static JScrollPane scroller ; private static String currentPage ; public void doAction ( ActionEvent e ) { if ( ( ReportHelp . helpWindow ) == null ) { ReportHelp . helpWindow = new JDialog ( new Frame ( ) , JMeterUtils . getResString ( "help" ) , false ) ; ReportHelp . helpWindow . getContentPane ( ) . setLayout ( new GridLayout ( 1 , 1 ) ) ; ComponentUtil . centerComponentInWindow ( ReportHelp . helpWindow , 60 ) ; } ReportHelp . helpWindow . getContentPane ( ) . removeAll ( ) ; ReportHelp . helpWindow . getContentPane ( ) . add ( ReportHelp . scroller ) ; <START_BUG> ReportHelp . helpWindow . show ( ) ; <END_BUG> if ( ( e . getSource ( ) ) instanceof String [ ] ) { String [ ] source = ( ( String [ ] ) ( e . getSource ( ) ) ) ; resetPage ( source [ 0 ] ) ; ReportHelp . helpDoc . scrollToReference ( source [ 1 ] ) ; } else { resetPage ( ReportHelp . HELP_PAGE ) ; ReportHelp . helpDoc . scrollToReference ( ReportGuiPackage . getInstance ( ) . getTreeListener ( ) . getCurrentNode ( ) . getDocAnchor ( ) ) ; } } private void resetPage ( String source ) { } public Set getActionNames ( ) { } }

Fix:
ReportHelp . helpWindow . setVisible ( true ) ;
Buggy code:
public class EndpointListenerManager { private static EndpointListenerManager instance = new EndpointListenerManager ( ) ; private InboundEndpointsDataStore dataStore ; private static final Logger log = Logger . getLogger ( EndpointListenerManager . class ) ; private EndpointListenerManager ( ) { } public static EndpointListenerManager getInstance ( ) { } public String getEndpointName ( int port , String domain ) { } public void startEndpoint ( int port , String name ) { } public void startSSLEndpoint ( int port , String name , SSLConfiguration sslConfiguration ) { } private void startListener ( int port , String name ) { } private void startSSLListener ( int port , String name , SSLConfiguration sslConfiguration ) { } public void closeEndpoint ( int port ) { } public void loadEndpointListeners ( ) { Map < Integer , List < InboundEndpointInfoDTO > > tenantData = dataStore . getAllEndpointData ( ) ; for ( Map . Entry tenantInfoEntry : tenantData . entrySet ( ) ) { int port = ( ( Integer ) ( tenantInfoEntry . getKey ( ) ) ) ; InboundEndpointInfoDTO inboundEndpointInfoDTO = ( ( InboundEndpointInfoDTO ) ( ( ( ArrayList ) ( tenantInfoEntry . getValue ( ) ) ) . get ( 0 ) ) ) ; if ( inboundEndpointInfoDTO . getProtocol ( ) . equals ( HTTP ) ) { startListener ( port , inboundEndpointInfoDTO . getEndpointName ( ) ) ; } else if ( inboundEndpointInfoDTO . getProtocol ( ) . equals ( HTTPS ) ) { <START_BUG> startSSLEndpoint ( port , inboundEndpointInfoDTO . getEndpointName ( ) , inboundEndpointInfoDTO . getSslConfiguration ( ) ) ; <END_BUG> } } } }

Fix:
startSSLListener ( port , inboundEndpointInfoDTO . getEndpointName ( ) , inboundEndpointInfoDTO . getSslConfiguration ( ) ) ;